Built motion from commit (unavailable).|2.5.14
[motion2.git] / server / api / faxInteraction / faxInteraction.rpc.js
index 48b3eb1..be90422 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x169f=['redis','./faxInteraction.socket','register','then','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','FaxInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','UpdateFaxInteraction','FaxInteraction','body','options','raw','where','debug','AddTagsToFaxInteraction','find','omit','spread','AddTags','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','defaults','localhost','socket.io-emitter'];(function(_0x516fa6,_0x4ebdd5){var _0x2d4aa5=function(_0x566903){while(--_0x566903){_0x516fa6['push'](_0x516fa6['shift']());}};_0x2d4aa5(++_0x4ebdd5);}(_0x169f,0x152));var _0xf169=function(_0x46a529,_0x11018a){_0x46a529=_0x46a529-0x0;var _0x1b169e=_0x169f[_0x46a529];return _0x1b169e;};'use strict';var _=require(_0xf169('0x0'));var util=require('util');var moment=require(_0xf169('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf169('0x2'));var db=require(_0xf169('0x3'))['db'];var utils=require(_0xf169('0x4'));var logger=require(_0xf169('0x5'))(_0xf169('0x6'));var config=require(_0xf169('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xf169('0x8')][_0xf169('0x9')]({'port':0x232a});config['redis']=_[_0xf169('0xa')](config['redis'],{'host':_0xf169('0xb'),'port':0x18eb});var socket=require(_0xf169('0xc'))(new Redis(config[_0xf169('0xd')]));require(_0xf169('0xe'))[_0xf169('0xf')](socket);function respondWithRpcPromise(_0x52f7bc,_0x3c8c10,_0x1036f9){return new BPromise(function(_0x2087b1,_0x1e7d04){return client['request'](_0x52f7bc,_0x1036f9)[_0xf169('0x10')](function(_0x1a0596){logger[_0xf169('0x11')](_0xf169('0x12'),_0x3c8c10,_0xf169('0x13'));logger['debug'](_0xf169('0x14'),_0x3c8c10,'request\x20sent',JSON[_0xf169('0x15')](_0x1a0596));if(_0x1a0596['error']){if(_0x1a0596[_0xf169('0x16')][_0xf169('0x17')]===0x1f4){logger[_0xf169('0x16')](_0xf169('0x12'),_0x3c8c10,_0x1a0596[_0xf169('0x16')][_0xf169('0x18')]);return _0x1e7d04(_0x1a0596[_0xf169('0x16')]['message']);}logger[_0xf169('0x16')](_0xf169('0x12'),_0x3c8c10,_0x1a0596[_0xf169('0x16')]['message']);return _0x2087b1(_0x1a0596[_0xf169('0x16')][_0xf169('0x18')]);}else{logger[_0xf169('0x11')](_0xf169('0x12'),_0x3c8c10,_0xf169('0x13'));_0x2087b1(_0x1a0596[_0xf169('0x19')][_0xf169('0x18')]);}})[_0xf169('0x1a')](function(_0x22acc7){logger[_0xf169('0x16')](_0xf169('0x12'),_0x3c8c10,_0x22acc7);_0x1e7d04(_0x22acc7);});});}exports[_0xf169('0x1b')]=function(_0x3bade3){var _0x56bb2f=this;return new Promise(function(_0x2e10a1,_0x5f4dfb){return db[_0xf169('0x1c')]['update'](_0x3bade3[_0xf169('0x1d')],{'raw':_0x3bade3[_0xf169('0x1e')]?_0x3bade3['options'][_0xf169('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3bade3['options']?_0x3bade3[_0xf169('0x1e')][_0xf169('0x20')]||null:null,'attributes':_0x3bade3[_0xf169('0x1e')]?_0x3bade3['options']['attributes']||null:null,'limit':_0x3bade3[_0xf169('0x1e')]?_0x3bade3[_0xf169('0x1e')]['limit']||null:null})[_0xf169('0x10')](function(_0x4b35df){logger[_0xf169('0x11')](_0xf169('0x1b'),_0x3bade3);logger[_0xf169('0x21')](_0xf169('0x1b'),_0x3bade3,JSON[_0xf169('0x15')](_0x4b35df));_0x2e10a1(_0x4b35df);})[_0xf169('0x1a')](function(_0x1867d7){logger[_0xf169('0x16')](_0xf169('0x1b'),_0x1867d7[_0xf169('0x18')],_0x3bade3);_0x5f4dfb(_0x56bb2f[_0xf169('0x16')](0x1f4,_0x1867d7[_0xf169('0x18')]));});});};exports[_0xf169('0x22')]=function(_0x6809f9){return new Promise(function(_0x38069b,_0x2124a7){return db['FaxInteraction'][_0xf169('0x23')]({'where':_0x6809f9[_0xf169('0x1e')]?_0x6809f9[_0xf169('0x1e')][_0xf169('0x20')]||null:null})['then'](function(_0x2f2669){if(_0x2f2669){return _0x2f2669['addTags'](_0x6809f9['body']['ids'],_[_0xf169('0x24')](_0x6809f9['body'],['ids','id'])||{});}})[_0xf169('0x25')](function(_0x28278a){logger['info'](_0xf169('0x26'),_0x6809f9);logger[_0xf169('0x21')](_0xf169('0x26'),_0x6809f9,JSON['stringify'](_0x28278a));_0x38069b(_0x28278a);})[_0xf169('0x1a')](function(_0x38864b){logger[_0xf169('0x16')](_0xf169('0x26'),_0x38864b[_0xf169('0x18')],_0x6809f9);_0x2124a7(_this[_0xf169('0x16')](0x1f4,_0x38864b[_0xf169('0x18')]));});});};
\ No newline at end of file
+var _0xf70f=['../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./faxInteraction.socket','register','request','then','info','request\x20sent','debug','FaxInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxInteraction,\x20%s,\x20%s','message','result','catch','UpdateFaxInteraction','FaxInteraction','update','body','options','raw','where','attributes','AddTagsToFaxInteraction','find','ids','omit','AddTags','lodash','util','moment','randomstring','ioredis'];(function(_0x5c77b4,_0x51d21e){var _0x59f9cf=function(_0x2e6fb0){while(--_0x2e6fb0){_0x5c77b4['push'](_0x5c77b4['shift']());}};_0x59f9cf(++_0x51d21e);}(_0xf70f,0xd2));var _0xff70=function(_0x5ce15c,_0x19c917){_0x5ce15c=_0x5ce15c-0x0;var _0x36e4f5=_0xf70f[_0x5ce15c];return _0x36e4f5;};'use strict';var _=require(_0xff70('0x0'));var util=require(_0xff70('0x1'));var moment=require(_0xff70('0x2'));var BPromise=require('bluebird');var rs=require(_0xff70('0x3'));var fs=require('fs');var Redis=require(_0xff70('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xff70('0x5'));var logger=require('../../config/logger')(_0xff70('0x6'));var config=require(_0xff70('0x7'));var jayson=require(_0xff70('0x8'));var client=jayson[_0xff70('0x9')][_0xff70('0xa')]({'port':0x232a});config[_0xff70('0xb')]=_[_0xff70('0xc')](config[_0xff70('0xb')],{'host':_0xff70('0xd'),'port':0x18eb});var socket=require(_0xff70('0xe'))(new Redis(config['redis']));require(_0xff70('0xf'))[_0xff70('0x10')](socket);function respondWithRpcPromise(_0x10ad26,_0x274899,_0x20dc04){return new BPromise(function(_0x233b8c,_0x5cca5b){return client[_0xff70('0x11')](_0x10ad26,_0x20dc04)[_0xff70('0x12')](function(_0x23239e){logger[_0xff70('0x13')]('FaxInteraction,\x20%s,\x20%s',_0x274899,_0xff70('0x14'));logger[_0xff70('0x15')](_0xff70('0x16'),_0x274899,_0xff70('0x14'),JSON[_0xff70('0x17')](_0x23239e));if(_0x23239e[_0xff70('0x18')]){if(_0x23239e[_0xff70('0x18')][_0xff70('0x19')]===0x1f4){logger['error'](_0xff70('0x1a'),_0x274899,_0x23239e[_0xff70('0x18')][_0xff70('0x1b')]);return _0x5cca5b(_0x23239e[_0xff70('0x18')][_0xff70('0x1b')]);}logger[_0xff70('0x18')](_0xff70('0x1a'),_0x274899,_0x23239e[_0xff70('0x18')]['message']);return _0x233b8c(_0x23239e[_0xff70('0x18')][_0xff70('0x1b')]);}else{logger[_0xff70('0x13')]('FaxInteraction,\x20%s,\x20%s',_0x274899,'request\x20sent');_0x233b8c(_0x23239e[_0xff70('0x1c')][_0xff70('0x1b')]);}})[_0xff70('0x1d')](function(_0x146dc9){logger[_0xff70('0x18')](_0xff70('0x1a'),_0x274899,_0x146dc9);_0x5cca5b(_0x146dc9);});});}exports[_0xff70('0x1e')]=function(_0x3f4202){var _0x12f880=this;return new Promise(function(_0x75951b,_0x19c220){return db[_0xff70('0x1f')][_0xff70('0x20')](_0x3f4202[_0xff70('0x21')],{'raw':_0x3f4202[_0xff70('0x22')]?_0x3f4202[_0xff70('0x22')][_0xff70('0x23')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3f4202[_0xff70('0x22')]?_0x3f4202[_0xff70('0x22')][_0xff70('0x24')]||null:null,'attributes':_0x3f4202[_0xff70('0x22')]?_0x3f4202[_0xff70('0x22')][_0xff70('0x25')]||null:null,'limit':_0x3f4202[_0xff70('0x22')]?_0x3f4202[_0xff70('0x22')]['limit']||null:null})[_0xff70('0x12')](function(_0xf1d1c0){logger[_0xff70('0x13')](_0xff70('0x1e'),_0x3f4202);logger[_0xff70('0x15')](_0xff70('0x1e'),_0x3f4202,JSON[_0xff70('0x17')](_0xf1d1c0));_0x75951b(_0xf1d1c0);})[_0xff70('0x1d')](function(_0x479cc9){logger['error'](_0xff70('0x1e'),_0x479cc9[_0xff70('0x1b')],_0x3f4202);_0x19c220(_0x12f880[_0xff70('0x18')](0x1f4,_0x479cc9['message']));});});};exports[_0xff70('0x26')]=function(_0x5a26c0){return new Promise(function(_0x4107ee,_0x1f7b62){return db[_0xff70('0x1f')][_0xff70('0x27')]({'where':_0x5a26c0[_0xff70('0x22')]?_0x5a26c0[_0xff70('0x22')][_0xff70('0x24')]||null:null})['then'](function(_0x1dc040){if(_0x1dc040){return _0x1dc040['addTags'](_0x5a26c0[_0xff70('0x21')][_0xff70('0x28')],_[_0xff70('0x29')](_0x5a26c0[_0xff70('0x21')],[_0xff70('0x28'),'id'])||{});}})['spread'](function(_0x4018b6){logger[_0xff70('0x13')](_0xff70('0x2a'),_0x5a26c0);logger[_0xff70('0x15')]('AddTags',_0x5a26c0,JSON[_0xff70('0x17')](_0x4018b6));_0x4107ee(_0x4018b6);})[_0xff70('0x1d')](function(_0x3771eb){logger[_0xff70('0x18')](_0xff70('0x2a'),_0x3771eb['message'],_0x5a26c0);_0x1f7b62(_this[_0xff70('0x18')](0x1f4,_0x3771eb[_0xff70('0x1b')]));});});};
\ No newline at end of file