Built motion from commit (unavailable).|2.5.15
[motion2.git] / server / api / squareRecording / squareRecording.rpc.js
index 3bcade9..411015c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c2b=['SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','result','CreateSquareRecording','SquareRecording','create','body','options','raw','lodash','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','request','then','info','SquareRecording,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x4d2842,_0x9fefa0){var _0x122e4f=function(_0x3bbf9f){while(--_0x3bbf9f){_0x4d2842['push'](_0x4d2842['shift']());}};_0x122e4f(++_0x9fefa0);}(_0x1c2b,0x191));var _0xb1c2=function(_0x817d9b,_0x3c37e3){_0x817d9b=_0x817d9b-0x0;var _0x2752e1=_0x1c2b[_0x817d9b];return _0x2752e1;};'use strict';var _=require(_0xb1c2('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xb1c2('0x1'));var rs=require(_0xb1c2('0x2'));var fs=require('fs');var Redis=require(_0xb1c2('0x3'));var db=require(_0xb1c2('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xb1c2('0x5'));var config=require(_0xb1c2('0x6'));var jayson=require(_0xb1c2('0x7'));var client=jayson[_0xb1c2('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x33ae37,_0x212883,_0x186494){return new BPromise(function(_0x42a496,_0x5b4bf5){return client[_0xb1c2('0x9')](_0x33ae37,_0x186494)[_0xb1c2('0xa')](function(_0x5d6e59){logger[_0xb1c2('0xb')](_0xb1c2('0xc'),_0x212883,_0xb1c2('0xd'));logger[_0xb1c2('0xe')](_0xb1c2('0xf'),_0x212883,_0xb1c2('0xd'),JSON[_0xb1c2('0x10')](_0x5d6e59));if(_0x5d6e59[_0xb1c2('0x11')]){if(_0x5d6e59['error']['code']===0x1f4){logger[_0xb1c2('0x11')](_0xb1c2('0xc'),_0x212883,_0x5d6e59['error'][_0xb1c2('0x12')]);return _0x5b4bf5(_0x5d6e59[_0xb1c2('0x11')]['message']);}logger['error']('SquareRecording,\x20%s,\x20%s',_0x212883,_0x5d6e59[_0xb1c2('0x11')][_0xb1c2('0x12')]);return _0x42a496(_0x5d6e59['error'][_0xb1c2('0x12')]);}else{logger['info'](_0xb1c2('0xc'),_0x212883,_0xb1c2('0xd'));_0x42a496(_0x5d6e59[_0xb1c2('0x13')]['message']);}})['catch'](function(_0x3efeb6){logger[_0xb1c2('0x11')]('SquareRecording,\x20%s,\x20%s',_0x212883,_0x3efeb6);_0x5b4bf5(_0x3efeb6);});});}exports[_0xb1c2('0x14')]=function(_0x4d5026){var _0x171a16=this;return new Promise(function(_0x6d37c4,_0x328f9f){return db[_0xb1c2('0x15')][_0xb1c2('0x16')](_0x4d5026[_0xb1c2('0x17')],{'raw':_0x4d5026['options']?_0x4d5026[_0xb1c2('0x18')][_0xb1c2('0x19')]===undefined?!![]:![]:!![]})[_0xb1c2('0xa')](function(_0x4c6057){logger[_0xb1c2('0xb')]('CreateSquareRecording',_0x4d5026);logger[_0xb1c2('0xe')](_0xb1c2('0x14'),_0x4d5026,JSON[_0xb1c2('0x10')](_0x4c6057));_0x6d37c4(_0x4c6057);})['catch'](function(_0xe91501){logger['error'](_0xb1c2('0x14'),_0xe91501['message'],_0x4d5026);_0x328f9f(_0x171a16['error'](0x1f4,_0xe91501[_0xb1c2('0x12')]));});});};
\ No newline at end of file
+var _0x216a=['rpc','http','request','SquareRecording,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','catch','CreateSquareRecording','SquareRecording','create','body','options','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x470d22,_0x1b6a4f){var _0x3cc44d=function(_0x4a3749){while(--_0x4a3749){_0x470d22['push'](_0x470d22['shift']());}};_0x3cc44d(++_0x1b6a4f);}(_0x216a,0x13d));var _0xa216=function(_0x33801c,_0x276c56){_0x33801c=_0x33801c-0x0;var _0x2b9d4a=_0x216a[_0x33801c];return _0x2b9d4a;};'use strict';var _=require(_0xa216('0x0'));var util=require(_0xa216('0x1'));var moment=require(_0xa216('0x2'));var BPromise=require(_0xa216('0x3'));var rs=require(_0xa216('0x4'));var fs=require('fs');var Redis=require(_0xa216('0x5'));var db=require(_0xa216('0x6'))['db'];var utils=require(_0xa216('0x7'));var logger=require('../../config/logger')(_0xa216('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xa216('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x291d6a,_0x153a6c,_0x32e549){return new BPromise(function(_0x1c7422,_0x40b72d){return client[_0xa216('0xa')](_0x291d6a,_0x32e549)['then'](function(_0x4a407e){logger['info'](_0xa216('0xb'),_0x153a6c,_0xa216('0xc'));logger['debug']('SquareRecording,\x20%s,\x20%s,\x20%s',_0x153a6c,'request\x20sent',JSON[_0xa216('0xd')](_0x4a407e));if(_0x4a407e[_0xa216('0xe')]){if(_0x4a407e['error']['code']===0x1f4){logger['error'](_0xa216('0xb'),_0x153a6c,_0x4a407e[_0xa216('0xe')]['message']);return _0x40b72d(_0x4a407e['error']['message']);}logger[_0xa216('0xe')](_0xa216('0xb'),_0x153a6c,_0x4a407e['error'][_0xa216('0xf')]);return _0x1c7422(_0x4a407e[_0xa216('0xe')][_0xa216('0xf')]);}else{logger[_0xa216('0x10')](_0xa216('0xb'),_0x153a6c,_0xa216('0xc'));_0x1c7422(_0x4a407e[_0xa216('0x11')][_0xa216('0xf')]);}})[_0xa216('0x12')](function(_0x482c63){logger['error']('SquareRecording,\x20%s,\x20%s',_0x153a6c,_0x482c63);_0x40b72d(_0x482c63);});});}exports[_0xa216('0x13')]=function(_0x553951){var _0x2f360d=this;return new Promise(function(_0x190ddf,_0x244ea1){return db[_0xa216('0x14')][_0xa216('0x15')](_0x553951[_0xa216('0x16')],{'raw':_0x553951[_0xa216('0x17')]?_0x553951['options']['raw']===undefined?!![]:![]:!![]})['then'](function(_0x38b3d7){logger['info'](_0xa216('0x13'),_0x553951);logger[_0xa216('0x18')](_0xa216('0x13'),_0x553951,JSON['stringify'](_0x38b3d7));_0x190ddf(_0x38b3d7);})[_0xa216('0x12')](function(_0x3dbfaa){logger[_0xa216('0xe')]('CreateSquareRecording',_0x3dbfaa[_0xa216('0xf')],_0x553951);_0x244ea1(_0x2f360d[_0xa216('0xe')](0x1f4,_0x3dbfaa[_0xa216('0xf')]));});});};
\ No newline at end of file