Built motion from commit 980b26c3.|2.6.29
[motion2.git] / server / api / jira / jira.controller.js
index 26d3cee..8bb2ea9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x92ea=['end','status','json','parse','error','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','api.jira','write','openIssue','body','headers','x-forwarded-for','connection','remoteAddress','socket','bluebird','https','../../config/logger','api','support','key','summary','Report','\x20from\x20','description','stringify','Bug','customfield_11500','email','fields','oldToken','newToken','customfield_11503','name','customfield_11504','reason','customfield_10102','/rest/api/2/issue','POST','application/json','Basic\x20','base64','request','setEncoding','utf8','data'];(function(_0xe15270,_0x227d06){var _0x1e813b=function(_0x1d590d){while(--_0x1d590d){_0xe15270['push'](_0xe15270['shift']());}};_0x1e813b(++_0x227d06);}(_0x92ea,0x99));var _0xa92e=function(_0x12e898,_0x1ef073){_0x12e898=_0x12e898-0x0;var _0x190631=_0x92ea[_0x12e898];return _0x190631;};'use strict';var BPromise=require(_0xa92e('0x0'));var https=require(_0xa92e('0x1'));var logger=require(_0xa92e('0x2'))(_0xa92e('0x3'));var USERNAME=_0xa92e('0x4');var PASSWORD='3eAmWpBVP0';function openIssue(_0x2b27c0,_0x4613f9){var _0x1c0ba6={'fields':{'project':{'key':_0x2b27c0[_0xa92e('0x5')]||'MOTGUI'},'summary':(_0x2b27c0[_0xa92e('0x6')]||_0xa92e('0x7'))+_0xa92e('0x8')+_0x2b27c0['ip'],'description':_0x2b27c0[_0xa92e('0x9')]||JSON[_0xa92e('0xa')](_0x2b27c0),'issuetype':{'name':_0x2b27c0['issuetype']||_0xa92e('0xb')}}};_0x1c0ba6['fields'][_0xa92e('0xc')]=_0x2b27c0[_0xa92e('0xd')];_0x1c0ba6[_0xa92e('0xe')]['customfield_11501']=_0x2b27c0[_0xa92e('0xf')];_0x1c0ba6[_0xa92e('0xe')]['customfield_11502']=_0x2b27c0[_0xa92e('0x10')];_0x1c0ba6[_0xa92e('0xe')][_0xa92e('0x11')]=_0x2b27c0[_0xa92e('0x12')];_0x1c0ba6['fields'][_0xa92e('0x13')]=_0x2b27c0[_0xa92e('0x14')];_0x1c0ba6[_0xa92e('0xe')][_0xa92e('0x15')]=_0x2b27c0['ip'];var _0x186334={'host':'track.xcallymotion.com','port':0x1bb,'path':_0xa92e('0x16'),'method':_0xa92e('0x17'),'timeout':0x4e20,'headers':{'Content-Type':_0xa92e('0x18'),'Authorization':_0xa92e('0x19')+new Buffer(USERNAME+':'+PASSWORD)['toString'](_0xa92e('0x1a'))}};var _0x54e92c=JSON['stringify'](_0x1c0ba6);var _0x49b9f2=https[_0xa92e('0x1b')](_0x186334,function(_0x227145){_0x227145[_0xa92e('0x1c')](_0xa92e('0x1d'));var _0x58fbe6='';_0x227145['on'](_0xa92e('0x1e'),function(_0x9c3352){_0x58fbe6+=_0x9c3352;});_0x227145['on'](_0xa92e('0x1f'),function(){if(_0x4613f9){return _0x4613f9[_0xa92e('0x20')](_0x227145['statusCode'])[_0xa92e('0x21')](JSON[_0xa92e('0x22')](_0x58fbe6));}});});_0x49b9f2['on'](_0xa92e('0x23'),function(_0x263015){if(_0x4613f9){return _0x4613f9['status'](0x1f4)[_0xa92e('0x21')]({'errors':[{'message':_0xa92e('0x24'),'type':_0xa92e('0x25')}]});}});_0x49b9f2[_0xa92e('0x26')](_0x54e92c);_0x49b9f2[_0xa92e('0x1f')]();}exports[_0xa92e('0x27')]=openIssue;exports['send']=function(_0x295d48,_0x259c10){_0x295d48[_0xa92e('0x28')]['ip']=_0x295d48[_0xa92e('0x29')][_0xa92e('0x2a')]||_0x295d48[_0xa92e('0x2b')][_0xa92e('0x2c')]||_0x295d48['socket'][_0xa92e('0x2c')]||_0x295d48[_0xa92e('0x2b')][_0xa92e('0x2d')]['remoteAddress'];return openIssue(_0x295d48[_0xa92e('0x28')],_0x259c10);};
\ No newline at end of file
+var _0xe015=['customfield_11504','track.xcallymotion.com','/rest/api/2/issue','POST','application/json','Basic\x20','toString','base64','request','setEncoding','utf8','data','statusCode','error','status','json','api.jira','end','headers','x-forwarded-for','connection','remoteAddress','socket','body','https','api','3eAmWpBVP0','summary','\x20from\x20','stringify','issuetype','Bug','fields','customfield_11500','customfield_11501','newToken','customfield_11503'];(function(_0x1a0ef3,_0x535bbf){var _0x2b86da=function(_0x5d30f9){while(--_0x5d30f9){_0x1a0ef3['push'](_0x1a0ef3['shift']());}};_0x2b86da(++_0x535bbf);}(_0xe015,0x165));var _0x5e01=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0xe015[_0x138adb];return _0x1b27f2;};'use strict';var BPromise=require('bluebird');var https=require(_0x5e01('0x0'));var logger=require('../../config/logger')(_0x5e01('0x1'));var USERNAME='support';var PASSWORD=_0x5e01('0x2');function openIssue(_0x200e34,_0xa66a16){var _0x2a608d={'fields':{'project':{'key':_0x200e34['key']||'MOTGUI'},'summary':(_0x200e34[_0x5e01('0x3')]||'Report')+_0x5e01('0x4')+_0x200e34['ip'],'description':_0x200e34['description']||JSON[_0x5e01('0x5')](_0x200e34),'issuetype':{'name':_0x200e34[_0x5e01('0x6')]||_0x5e01('0x7')}}};_0x2a608d[_0x5e01('0x8')][_0x5e01('0x9')]=_0x200e34['email'];_0x2a608d[_0x5e01('0x8')][_0x5e01('0xa')]=_0x200e34['oldToken'];_0x2a608d[_0x5e01('0x8')]['customfield_11502']=_0x200e34[_0x5e01('0xb')];_0x2a608d[_0x5e01('0x8')][_0x5e01('0xc')]=_0x200e34['name'];_0x2a608d['fields'][_0x5e01('0xd')]=_0x200e34['reason'];_0x2a608d[_0x5e01('0x8')]['customfield_10102']=_0x200e34['ip'];var _0x261cc4={'host':_0x5e01('0xe'),'port':0x1bb,'path':_0x5e01('0xf'),'method':_0x5e01('0x10'),'timeout':0x4e20,'headers':{'Content-Type':_0x5e01('0x11'),'Authorization':_0x5e01('0x12')+new Buffer(USERNAME+':'+PASSWORD)[_0x5e01('0x13')](_0x5e01('0x14'))}};var _0x5b6a01=JSON[_0x5e01('0x5')](_0x2a608d);var _0xbe236a=https[_0x5e01('0x15')](_0x261cc4,function(_0x3ea358){_0x3ea358[_0x5e01('0x16')](_0x5e01('0x17'));var _0x3a18c5='';_0x3ea358['on'](_0x5e01('0x18'),function(_0x253670){_0x3a18c5+=_0x253670;});_0x3ea358['on']('end',function(){if(_0xa66a16){return _0xa66a16['status'](_0x3ea358[_0x5e01('0x19')])['json'](JSON['parse'](_0x3a18c5));}});});_0xbe236a['on'](_0x5e01('0x1a'),function(_0x585216){if(_0xa66a16){return _0xa66a16[_0x5e01('0x1b')](0x1f4)[_0x5e01('0x1c')]({'errors':[{'message':'Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','type':_0x5e01('0x1d')}]});}});_0xbe236a['write'](_0x5b6a01);_0xbe236a[_0x5e01('0x1e')]();}exports['openIssue']=openIssue;exports['send']=function(_0x44ba3e,_0x436eb3){_0x44ba3e['body']['ip']=_0x44ba3e[_0x5e01('0x1f')][_0x5e01('0x20')]||_0x44ba3e[_0x5e01('0x21')][_0x5e01('0x22')]||_0x44ba3e[_0x5e01('0x23')]['remoteAddress']||_0x44ba3e[_0x5e01('0x21')][_0x5e01('0x23')][_0x5e01('0x22')];return openIssue(_0x44ba3e[_0x5e01('0x24')],_0x436eb3);};
\ No newline at end of file