Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / api / voiceDialReport / voiceDialReport.controller.js
index f8bebb2..0f23fcf 100644 (file)
@@ -1 +1 @@
-const a866_0x2da4=['map','destroy','keys','set','error','query','limit','describe','json','fields','intersection','sort','merge','name','../../components/parsers/qs','sequelize','sendStatus','offset','status','length','end','filters','create','options','VIRTUAL','type','Content-Range','key','../../mysqldb','api','rawAttributes','stack','includeAll','findOne','nolimit','filter','catch','../../config/logger','include','pick','where','attributes','count','undefined','show','body','params','update','model','then','like','VoiceDialReport'];(function(_0x1253ef,_0x16aae4){const _0x2da4cb=function(_0x2790dc){while(--_0x2790dc){_0x1253ef['push'](_0x1253ef['shift']());}};_0x2da4cb(++_0x16aae4);}(a866_0x2da4,0x8d));const a866_0x2790=function(_0x1253ef,_0x16aae4){_0x1253ef=_0x1253ef-0x8b;let _0x2da4cb=a866_0x2da4[_0x1253ef];return _0x2da4cb;};const a866_0x33f1da=a866_0x2790;'use strict';const _=require('lodash'),qs=require(a866_0x33f1da(0xa8)),logger=require(a866_0x33f1da(0x8b))(a866_0x33f1da(0xb7)),{db}=require(a866_0x33f1da(0xb6)),{Op}=require(a866_0x33f1da(0xa9));function respondWithResult(_0x27eaad,_0x42b735){return _0x42b735=_0x42b735||0xc8,function(_0x3cfb7a){const _0x2238b5=a866_0x2790;if(_0x3cfb7a)return _0x27eaad[_0x2238b5(0xac)](_0x42b735)['json'](_0x3cfb7a);};}function respondWithFilteredResult(_0x4492b8,_0xa91874){return function(_0xe92a0f){const _0x4945fc=a866_0x2790;if(_0xe92a0f){const _0x4f9d04=_0xe92a0f[_0x4945fc(0x90)],_0x439979=_0xa91874[_0x4945fc(0xab)];let _0xb2832a=_0xa91874['offset']+_0xa91874[_0x4945fc(0xa0)],_0x5a14e3;return _0xb2832a>=_0x4f9d04?(_0xb2832a=_0x4f9d04,_0x5a14e3=0xc8):_0x5a14e3=0xce,_0x4492b8['status'](_0x5a14e3),_0x4492b8[_0x4945fc(0x9d)](_0x4945fc(0xb4),_0x439979+'-'+_0xb2832a+'/'+_0x4f9d04)[_0x4945fc(0xa2)](_0xe92a0f);}return null;};}function saveUpdates(_0x562a4e){return function(_0x2b9bdb){const _0x2c14da=a866_0x2790;if(_0x2b9bdb)return _0x2b9bdb[_0x2c14da(0x95)](_0x562a4e)[_0x2c14da(0x97)](function(_0x2a77ea){return _0x2a77ea;});return null;};}function removeEntity(_0x592e6c){return function(_0x44a615){const _0x225c9a=a866_0x2790;if(_0x44a615)return _0x44a615[_0x225c9a(0x9b)]()['then'](function(){const _0x299d08=_0x225c9a;_0x592e6c[_0x299d08(0xac)](0xcc)[_0x299d08(0xae)]();});};}function handleEntityNotFound(_0x61ee9b){return function(_0x6f590c){const _0x540d54=a866_0x2790;return!_0x6f590c&&_0x61ee9b[_0x540d54(0xaa)](0x194),_0x6f590c;};}function handleError(_0x590a69,_0x2cf443){return _0x2cf443=_0x2cf443||0x1f4,function(_0x7563ea){const _0x5346a4=a866_0x2790;logger[_0x5346a4(0x9e)](_0x7563ea[_0x5346a4(0xb9)]),_0x7563ea[_0x5346a4(0xa7)]&&delete _0x7563ea['name'],_0x590a69[_0x5346a4(0xac)](_0x2cf443)['send'](_0x7563ea);};}exports['index']=function(_0x30ca98,_0x5cf339){const _0x54726a=a866_0x33f1da;let _0x1a9ec0={};const _0xf0658a={},_0x4ec031={'count':0x0,'rows':[]},_0x5d4178=_[_0x54726a(0x9a)](db[_0x54726a(0x99)][_0x54726a(0xb8)],function(_0x39e688){const _0x50d94b=_0x54726a;return{'name':_0x39e688['fieldName'],'type':_0x39e688[_0x50d94b(0xb3)][_0x50d94b(0xb5)]};});_0xf0658a['model']=_[_0x54726a(0x9a)](_0x5d4178,'name'),_0xf0658a[_0x54726a(0x9f)]=_['keys'](_0x30ca98['query']),_0xf0658a[_0x54726a(0xaf)]=_['intersection'](_0xf0658a[_0x54726a(0x96)],_0xf0658a[_0x54726a(0x9f)]),_0x1a9ec0[_0x54726a(0x8f)]=_[_0x54726a(0xa4)](_0xf0658a['model'],qs[_0x54726a(0xa3)](_0x30ca98['query']['fields'])),_0x1a9ec0[_0x54726a(0x8f)]=_0x1a9ec0[_0x54726a(0x8f)][_0x54726a(0xad)]?_0x1a9ec0[_0x54726a(0x8f)]:_0xf0658a[_0x54726a(0x96)];typeof _0x30ca98[_0x54726a(0x9f)][_0x54726a(0xbc)]===_0x54726a(0x91)&&(_0x1a9ec0['limit']=qs['limit'](_0x30ca98[_0x54726a(0x9f)]['limit']),_0x1a9ec0[_0x54726a(0xab)]=qs[_0x54726a(0xab)](_0x30ca98[_0x54726a(0x9f)][_0x54726a(0xab)]));_0x1a9ec0['order']=qs[_0x54726a(0xa5)](_0x30ca98[_0x54726a(0x9f)][_0x54726a(0xa5)]),_0x1a9ec0[_0x54726a(0x8e)]=qs[_0x54726a(0xaf)](_[_0x54726a(0x8d)](_0x30ca98[_0x54726a(0x9f)],_0xf0658a['filters']),_0x5d4178);_0x30ca98[_0x54726a(0x9f)][_0x54726a(0xbd)]&&(_0x1a9ec0[_0x54726a(0x8e)]=_[_0x54726a(0xa6)](_0x1a9ec0[_0x54726a(0x8e)],{[Op['or']]:_[_0x54726a(0x9a)](_0x5d4178,function(_0xddef80){const _0x46f5e5=_0x54726a;if(_0xddef80[_0x46f5e5(0xb3)]!==_0x46f5e5(0xb2)){const _0x3fa0b8={};return _0x3fa0b8[_0xddef80[_0x46f5e5(0xa7)]]={[Op[_0x46f5e5(0x98)]]:'%'+_0x30ca98[_0x46f5e5(0x9f)]['filter']+'%'},_0x3fa0b8;}})}));_0x1a9ec0=_[_0x54726a(0xa6)]({},_0x1a9ec0,_0x30ca98[_0x54726a(0xb1)]);const _0x500b77={'where':_0x1a9ec0[_0x54726a(0x8e)]};return db[_0x54726a(0x99)][_0x54726a(0x90)](_0x500b77)['then'](function(_0x23e8e9){const _0x19d4c2=_0x54726a;return _0x4ec031[_0x19d4c2(0x90)]=_0x23e8e9,_0x30ca98[_0x19d4c2(0x9f)][_0x19d4c2(0xba)]&&(_0x1a9ec0[_0x19d4c2(0x8c)]=[{'all':!![]}]),db['VoiceDialReport']['findAll'](_0x1a9ec0);})[_0x54726a(0x97)](function(_0x2d0f96){return _0x4ec031['rows']=_0x2d0f96,_0x4ec031;})[_0x54726a(0x97)](respondWithFilteredResult(_0x5cf339,_0x1a9ec0))[_0x54726a(0xbe)](handleError(_0x5cf339,null));},exports[a866_0x33f1da(0x92)]=function(_0x3a6c39,_0x17e003){const _0x41a5af=a866_0x33f1da;let _0x28468b={'raw':!![],'where':{'id':_0x3a6c39[_0x41a5af(0x94)]['id']}};const _0x31ddb7={};return _0x31ddb7[_0x41a5af(0x96)]=_[_0x41a5af(0x9c)](db[_0x41a5af(0x99)][_0x41a5af(0xb8)]),_0x31ddb7[_0x41a5af(0x9f)]=_['keys'](_0x3a6c39[_0x41a5af(0x9f)]),_0x31ddb7['filters']=_[_0x41a5af(0xa4)](_0x31ddb7[_0x41a5af(0x96)],_0x31ddb7['query']),_0x28468b[_0x41a5af(0x8f)]=_['intersection'](_0x31ddb7[_0x41a5af(0x96)],qs[_0x41a5af(0xa3)](_0x3a6c39['query'][_0x41a5af(0xa3)])),_0x28468b['attributes']=_0x28468b[_0x41a5af(0x8f)][_0x41a5af(0xad)]?_0x28468b[_0x41a5af(0x8f)]:_0x31ddb7[_0x41a5af(0x96)],_0x3a6c39[_0x41a5af(0x9f)][_0x41a5af(0xba)]&&(_0x28468b['include']=[{'all':!![]}]),_0x28468b=_[_0x41a5af(0xa6)]({},_0x28468b,_0x3a6c39[_0x41a5af(0xb1)]),db[_0x41a5af(0x99)][_0x41a5af(0xbb)](_0x28468b)[_0x41a5af(0x97)](handleEntityNotFound(_0x17e003,null))[_0x41a5af(0x97)](respondWithResult(_0x17e003,null))['catch'](handleError(_0x17e003,null));},exports['create']=function(_0x1d962a,_0x1f7460){const _0x1434f6=a866_0x33f1da;return db[_0x1434f6(0x99)][_0x1434f6(0xb0)](_0x1d962a[_0x1434f6(0x93)],{})[_0x1434f6(0x97)](respondWithResult(_0x1f7460,0xc9))[_0x1434f6(0xbe)](handleError(_0x1f7460,null));},exports[a866_0x33f1da(0x95)]=function(_0x2e9d20,_0x4c3c71){const _0x3d32d7=a866_0x33f1da;return _0x2e9d20[_0x3d32d7(0x93)]['id']&&delete _0x2e9d20['body']['id'],db[_0x3d32d7(0x99)][_0x3d32d7(0xbb)]({'where':{'id':_0x2e9d20[_0x3d32d7(0x94)]['id']}})['then'](handleEntityNotFound(_0x4c3c71,null))['then'](saveUpdates(_0x2e9d20['body'],null))[_0x3d32d7(0x97)](respondWithResult(_0x4c3c71,null))['catch'](handleError(_0x4c3c71,null));},exports[a866_0x33f1da(0x9b)]=function(_0x31f444,_0x553ae7){const _0x3d052b=a866_0x33f1da;return db['VoiceDialReport']['findOne']({'where':{'id':_0x31f444[_0x3d052b(0x94)]['id']}})[_0x3d052b(0x97)](handleEntityNotFound(_0x553ae7,null))['then'](removeEntity(_0x553ae7,null))[_0x3d052b(0xbe)](handleError(_0x553ae7,null));},exports['describe']=function(_0x5446cf,_0x323ab1){const _0x2d16c6=a866_0x33f1da;return db[_0x2d16c6(0x99)][_0x2d16c6(0xa1)]()[_0x2d16c6(0x97)](respondWithResult(_0x323ab1,null))[_0x2d16c6(0xbe)](handleError(_0x323ab1,null));};
\ No newline at end of file
+const a866_0x3be8=['then','findAll','include','json','type','length','status','body','keys','name','intersection','findOne','key','../../mysqldb','limit','params','order','set','filters','api','index','Content-Range','merge','attributes','sequelize','nolimit','rows','undefined','like','map','send','show','fields','catch','../../components/parsers/qs','model','VIRTUAL','pick','options','rawAttributes','error','update','describe','sort','VoiceDialReport','destroy','offset','filter','where','create','query','includeAll','count'];(function(_0x2203a6,_0x5ed031){const _0x3be816=function(_0x347126){while(--_0x347126){_0x2203a6['push'](_0x2203a6['shift']());}};_0x3be816(++_0x5ed031);}(a866_0x3be8,0x1e9));const a866_0x3471=function(_0x2203a6,_0x5ed031){_0x2203a6=_0x2203a6-0x83;let _0x3be816=a866_0x3be8[_0x2203a6];return _0x3be816;};const a866_0x44dea3=a866_0x3471;'use strict';const _=require('lodash'),qs=require(a866_0x44dea3(0x99)),logger=require('../../config/logger')(a866_0x44dea3(0x8a)),{db}=require(a866_0x44dea3(0x84)),{Op}=require(a866_0x44dea3(0x8f));function respondWithResult(_0x429b8c,_0x102851){return _0x102851=_0x102851||0xc8,function(_0x143e84){const _0x1754c2=a866_0x3471;if(_0x143e84)return _0x429b8c['status'](_0x102851)[_0x1754c2(0xaf)](_0x143e84);};}function respondWithFilteredResult(_0x56c121,_0xd0ade5){return function(_0xe1bb95){const _0x9aad4=a866_0x3471;if(_0xe1bb95){const _0xa31eb1=_0xe1bb95[_0x9aad4(0xab)],_0xc49cac=_0xd0ade5[_0x9aad4(0xa5)];let _0x91ae87=_0xd0ade5[_0x9aad4(0xa5)]+_0xd0ade5['limit'],_0xfae727;return _0x91ae87>=_0xa31eb1?(_0x91ae87=_0xa31eb1,_0xfae727=0xc8):_0xfae727=0xce,_0x56c121[_0x9aad4(0xb2)](_0xfae727),_0x56c121[_0x9aad4(0x88)](_0x9aad4(0x8c),_0xc49cac+'-'+_0x91ae87+'/'+_0xa31eb1)['json'](_0xe1bb95);}return null;};}function saveUpdates(_0x307749){return function(_0x5ab2ac){const _0x15a42b=a866_0x3471;if(_0x5ab2ac)return _0x5ab2ac['update'](_0x307749)[_0x15a42b(0xac)](function(_0x555951){return _0x555951;});return null;};}function removeEntity(_0x941702){return function(_0xedf0cf){const _0x2931fc=a866_0x3471;if(_0xedf0cf)return _0xedf0cf['destroy']()[_0x2931fc(0xac)](function(){const _0x228bd0=_0x2931fc;_0x941702[_0x228bd0(0xb2)](0xcc)['end']();});};}function handleEntityNotFound(_0x38a9e2){return function(_0x43cac1){return!_0x43cac1&&_0x38a9e2['sendStatus'](0x194),_0x43cac1;};}function handleError(_0x52b3a6,_0x2c8116){return _0x2c8116=_0x2c8116||0x1f4,function(_0x1c7bd4){const _0x29fd86=a866_0x3471;logger[_0x29fd86(0x9f)](_0x1c7bd4['stack']),_0x1c7bd4[_0x29fd86(0xb5)]&&delete _0x1c7bd4[_0x29fd86(0xb5)],_0x52b3a6[_0x29fd86(0xb2)](_0x2c8116)[_0x29fd86(0x95)](_0x1c7bd4);};}exports[a866_0x44dea3(0x8b)]=function(_0x2eba4b,_0x538cde){const _0x4adb9d=a866_0x44dea3;let _0x1efd1d={};const _0x5e683d={},_0x2eb4db={'count':0x0,'rows':[]},_0x3cd405=_[_0x4adb9d(0x94)](db[_0x4adb9d(0xa3)][_0x4adb9d(0x9e)],function(_0x413c3e){const _0x50c694=_0x4adb9d;return{'name':_0x413c3e['fieldName'],'type':_0x413c3e['type'][_0x50c694(0x83)]};});_0x5e683d['model']=_[_0x4adb9d(0x94)](_0x3cd405,'name'),_0x5e683d[_0x4adb9d(0xa9)]=_[_0x4adb9d(0xb4)](_0x2eba4b['query']),_0x5e683d[_0x4adb9d(0x89)]=_[_0x4adb9d(0xb6)](_0x5e683d[_0x4adb9d(0x9a)],_0x5e683d[_0x4adb9d(0xa9)]),_0x1efd1d['attributes']=_[_0x4adb9d(0xb6)](_0x5e683d[_0x4adb9d(0x9a)],qs['fields'](_0x2eba4b[_0x4adb9d(0xa9)][_0x4adb9d(0x97)])),_0x1efd1d['attributes']=_0x1efd1d[_0x4adb9d(0x8e)][_0x4adb9d(0xb1)]?_0x1efd1d[_0x4adb9d(0x8e)]:_0x5e683d[_0x4adb9d(0x9a)];typeof _0x2eba4b['query'][_0x4adb9d(0x90)]===_0x4adb9d(0x92)&&(_0x1efd1d[_0x4adb9d(0x85)]=qs[_0x4adb9d(0x85)](_0x2eba4b[_0x4adb9d(0xa9)][_0x4adb9d(0x85)]),_0x1efd1d[_0x4adb9d(0xa5)]=qs['offset'](_0x2eba4b['query']['offset']));_0x1efd1d[_0x4adb9d(0x87)]=qs[_0x4adb9d(0xa2)](_0x2eba4b[_0x4adb9d(0xa9)]['sort']),_0x1efd1d['where']=qs[_0x4adb9d(0x89)](_[_0x4adb9d(0x9c)](_0x2eba4b[_0x4adb9d(0xa9)],_0x5e683d[_0x4adb9d(0x89)]),_0x3cd405);_0x2eba4b['query'][_0x4adb9d(0xa6)]&&(_0x1efd1d[_0x4adb9d(0xa7)]=_[_0x4adb9d(0x8d)](_0x1efd1d[_0x4adb9d(0xa7)],{[Op['or']]:_['map'](_0x3cd405,function(_0x1516dc){const _0x49850a=_0x4adb9d;if(_0x1516dc[_0x49850a(0xb0)]!==_0x49850a(0x9b)){const _0xc31c14={};return _0xc31c14[_0x1516dc['name']]={[Op[_0x49850a(0x93)]]:'%'+_0x2eba4b[_0x49850a(0xa9)]['filter']+'%'},_0xc31c14;}})}));_0x1efd1d=_[_0x4adb9d(0x8d)]({},_0x1efd1d,_0x2eba4b[_0x4adb9d(0x9d)]);const _0x110f73={'where':_0x1efd1d[_0x4adb9d(0xa7)]};return db['VoiceDialReport'][_0x4adb9d(0xab)](_0x110f73)[_0x4adb9d(0xac)](function(_0x34a24c){const _0xd288b9=_0x4adb9d;return _0x2eb4db[_0xd288b9(0xab)]=_0x34a24c,_0x2eba4b[_0xd288b9(0xa9)][_0xd288b9(0xaa)]&&(_0x1efd1d[_0xd288b9(0xae)]=[{'all':!![]}]),db['VoiceDialReport'][_0xd288b9(0xad)](_0x1efd1d);})[_0x4adb9d(0xac)](function(_0x54973b){const _0x5c4c82=_0x4adb9d;return _0x2eb4db[_0x5c4c82(0x91)]=_0x54973b,_0x2eb4db;})[_0x4adb9d(0xac)](respondWithFilteredResult(_0x538cde,_0x1efd1d))[_0x4adb9d(0x98)](handleError(_0x538cde,null));},exports[a866_0x44dea3(0x96)]=function(_0x5c149d,_0x343899){const _0x591252=a866_0x44dea3;let _0x1bf3cc={'raw':!![],'where':{'id':_0x5c149d[_0x591252(0x86)]['id']}};const _0x42b431={};return _0x42b431[_0x591252(0x9a)]=_['keys'](db['VoiceDialReport'][_0x591252(0x9e)]),_0x42b431[_0x591252(0xa9)]=_[_0x591252(0xb4)](_0x5c149d[_0x591252(0xa9)]),_0x42b431['filters']=_[_0x591252(0xb6)](_0x42b431['model'],_0x42b431[_0x591252(0xa9)]),_0x1bf3cc[_0x591252(0x8e)]=_[_0x591252(0xb6)](_0x42b431['model'],qs[_0x591252(0x97)](_0x5c149d[_0x591252(0xa9)]['fields'])),_0x1bf3cc[_0x591252(0x8e)]=_0x1bf3cc[_0x591252(0x8e)][_0x591252(0xb1)]?_0x1bf3cc[_0x591252(0x8e)]:_0x42b431[_0x591252(0x9a)],_0x5c149d[_0x591252(0xa9)][_0x591252(0xaa)]&&(_0x1bf3cc[_0x591252(0xae)]=[{'all':!![]}]),_0x1bf3cc=_[_0x591252(0x8d)]({},_0x1bf3cc,_0x5c149d[_0x591252(0x9d)]),db['VoiceDialReport'][_0x591252(0xb7)](_0x1bf3cc)['then'](handleEntityNotFound(_0x343899,null))[_0x591252(0xac)](respondWithResult(_0x343899,null))[_0x591252(0x98)](handleError(_0x343899,null));},exports[a866_0x44dea3(0xa8)]=function(_0x5ba263,_0x369115){const _0x4cd3bd=a866_0x44dea3;return db[_0x4cd3bd(0xa3)][_0x4cd3bd(0xa8)](_0x5ba263[_0x4cd3bd(0xb3)],{})[_0x4cd3bd(0xac)](respondWithResult(_0x369115,0xc9))[_0x4cd3bd(0x98)](handleError(_0x369115,null));},exports[a866_0x44dea3(0xa0)]=function(_0x2a8989,_0x4600f9){const _0x5d98f2=a866_0x44dea3;return _0x2a8989[_0x5d98f2(0xb3)]['id']&&delete _0x2a8989[_0x5d98f2(0xb3)]['id'],db[_0x5d98f2(0xa3)]['findOne']({'where':{'id':_0x2a8989[_0x5d98f2(0x86)]['id']}})[_0x5d98f2(0xac)](handleEntityNotFound(_0x4600f9,null))[_0x5d98f2(0xac)](saveUpdates(_0x2a8989[_0x5d98f2(0xb3)],null))['then'](respondWithResult(_0x4600f9,null))['catch'](handleError(_0x4600f9,null));},exports[a866_0x44dea3(0xa4)]=function(_0x47975d,_0x5f5d6f){const _0x20d399=a866_0x44dea3;return db[_0x20d399(0xa3)][_0x20d399(0xb7)]({'where':{'id':_0x47975d['params']['id']}})[_0x20d399(0xac)](handleEntityNotFound(_0x5f5d6f,null))[_0x20d399(0xac)](removeEntity(_0x5f5d6f,null))['catch'](handleError(_0x5f5d6f,null));},exports[a866_0x44dea3(0xa1)]=function(_0x57dfdb,_0x6d0d2c){const _0x4695b1=a866_0x44dea3;return db[_0x4695b1(0xa3)][_0x4695b1(0xa1)]()[_0x4695b1(0xac)](respondWithResult(_0x6d0d2c,null))[_0x4695b1(0x98)](handleError(_0x6d0d2c,null));};
\ No newline at end of file