Built motion from commit (unavailable).|2.3.4
[motion2.git] / server / api / license / license.rpc.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x066f=['client','http','request','then','info','License,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise'];(function(_0x1e4767,_0x677140){var _0x282ac5=function(_0x2e3c79){while(--_0x2e3c79){_0x1e4767['push'](_0x1e4767['shift']());}};_0x282ac5(++_0x677140);}(_0x066f,0x1d0));var _0xf066=function(_0x57da8d,_0x101608){_0x57da8d=_0x57da8d-0x0;var _0x1b0c77=_0x066f[_0x57da8d];return _0x1b0c77;};'use strict';var _=require(_0xf066('0x0'));var util=require(_0xf066('0x1'));var moment=require(_0xf066('0x2'));var BPromise=require(_0xf066('0x3'));var rs=require(_0xf066('0x4'));var fs=require('fs');var Redis=require(_0xf066('0x5'));var db=require(_0xf066('0x6'))['db'];var utils=require(_0xf066('0x7'));var logger=require('../../config/logger')(_0xf066('0x8'));var config=require(_0xf066('0x9'));var jayson=require(_0xf066('0xa'));var client=jayson[_0xf066('0xb')][_0xf066('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xc76e52,_0x5c1ec6,_0x1aa4bf){return new BPromise(function(_0x21bd37,_0xaf5a12){return client[_0xf066('0xd')](_0xc76e52,_0x1aa4bf)[_0xf066('0xe')](function(_0x385ab3){logger[_0xf066('0xf')](_0xf066('0x10'),_0x5c1ec6,_0xf066('0x11'));logger[_0xf066('0x12')]('License,\x20%s,\x20%s,\x20%s',_0x5c1ec6,_0xf066('0x11'),JSON[_0xf066('0x13')](_0x385ab3));if(_0x385ab3[_0xf066('0x14')]){if(_0x385ab3[_0xf066('0x14')][_0xf066('0x15')]===0x1f4){logger[_0xf066('0x14')](_0xf066('0x10'),_0x5c1ec6,_0x385ab3[_0xf066('0x14')][_0xf066('0x16')]);return _0xaf5a12(_0x385ab3[_0xf066('0x14')]['message']);}logger[_0xf066('0x14')](_0xf066('0x10'),_0x5c1ec6,_0x385ab3[_0xf066('0x14')]['message']);return _0x21bd37(_0x385ab3[_0xf066('0x14')][_0xf066('0x16')]);}else{logger['info'](_0xf066('0x10'),_0x5c1ec6,_0xf066('0x11'));_0x21bd37(_0x385ab3[_0xf066('0x17')][_0xf066('0x16')]);}})[_0xf066('0x18')](function(_0x470316){logger[_0xf066('0x14')]('License,\x20%s,\x20%s',_0x5c1ec6,_0x470316);_0xaf5a12(_0x470316);});});}