fb20b1ee9f0abd7cbb70238c6ce382b2751acefd
[motion-next.git] / server / api / jira / jira.controller.js
1 const a371_0x43ce=['x-forwarded-for','remoteAddress','MOTGUI','3eAmWpBVP0','error','end','customfield_11501','headers','Basic\x20','\x20from\x20','name','newToken','base64','socket','fields','utf8','request','issuetype','api.jira','statusCode','write','status','stringify','reason','parse','email','/rest/api/2/issue','toString','track.xcallymotion.com','Bug','connection','customfield_11504','json','Report','POST','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','customfield_11502','setEncoding','send','key','application/json'];(function(_0xc5da22,_0x43cef9){const _0x3c8acd=function(_0x3c5bbf){while(--_0x3c5bbf){_0xc5da22['push'](_0xc5da22['shift']());}};_0x3c8acd(++_0x43cef9);}(a371_0x43ce,0x89));const a371_0x3c8a=function(_0xc5da22,_0x43cef9){_0xc5da22=_0xc5da22-0x0;let _0x3c8acd=a371_0x43ce[_0xc5da22];return _0x3c8acd;};const _0x21b6c0=a371_0x3c8a;'use strict';const https=require('https'),USERNAME='support',PASSWORD=_0x21b6c0('0x1e');function openIssue(_0x3c5bbf,_0x4cdc89){const _0x3f73e5=_0x21b6c0,_0x15ba0f={'fields':{'project':{'key':_0x3c5bbf[_0x3f73e5('0x19')]||_0x3f73e5('0x1d')},'summary':(_0x3c5bbf['summary']||_0x3f73e5('0x13'))+_0x3f73e5('0x24')+_0x3c5bbf['ip'],'description':_0x3c5bbf['description']||JSON['stringify'](_0x3c5bbf),'issuetype':{'name':_0x3c5bbf[_0x3f73e5('0x3')]||_0x3f73e5('0xf')}}};_0x15ba0f[_0x3f73e5('0x0')]['customfield_11500']=_0x3c5bbf[_0x3f73e5('0xb')],_0x15ba0f['fields'][_0x3f73e5('0x21')]=_0x3c5bbf['oldToken'],_0x15ba0f[_0x3f73e5('0x0')][_0x3f73e5('0x16')]=_0x3c5bbf[_0x3f73e5('0x26')],_0x15ba0f[_0x3f73e5('0x0')]['customfield_11503']=_0x3c5bbf[_0x3f73e5('0x25')],_0x15ba0f['fields'][_0x3f73e5('0x11')]=_0x3c5bbf[_0x3f73e5('0x9')],_0x15ba0f[_0x3f73e5('0x0')]['customfield_10102']=_0x3c5bbf['ip'];const _0x281ea9={'host':_0x3f73e5('0xe'),'port':0x1bb,'path':_0x3f73e5('0xc'),'method':_0x3f73e5('0x14'),'timeout':0x4e20,'headers':{'Content-Type':_0x3f73e5('0x1a'),'Authorization':_0x3f73e5('0x23')+Buffer['from'](USERNAME+':'+PASSWORD)[_0x3f73e5('0xd')](_0x3f73e5('0x27'))}},_0x6bf440=JSON[_0x3f73e5('0x8')](_0x15ba0f),_0x1480e2=https[_0x3f73e5('0x2')](_0x281ea9,function(_0x19080a){const _0x1668ec=_0x3f73e5;_0x19080a[_0x1668ec('0x17')](_0x1668ec('0x1'));let _0x38b970='';_0x19080a['on']('data',function(_0x108bc0){_0x38b970+=_0x108bc0;}),_0x19080a['on']('end',function(){const _0x5d5cbd=_0x1668ec;if(_0x4cdc89)return _0x4cdc89[_0x5d5cbd('0x7')](_0x19080a[_0x5d5cbd('0x5')])[_0x5d5cbd('0x12')](JSON[_0x5d5cbd('0xa')](_0x38b970));});});_0x1480e2['on'](_0x3f73e5('0x1f'),function(){const _0x225632=_0x3f73e5;if(_0x4cdc89)return _0x4cdc89[_0x225632('0x7')](0x1f4)['json']({'errors':[{'message':_0x225632('0x15'),'type':_0x225632('0x4')}]});}),_0x1480e2[_0x3f73e5('0x6')](_0x6bf440),_0x1480e2[_0x3f73e5('0x20')]();}exports['openIssue']=openIssue,exports[_0x21b6c0('0x18')]=function(_0x389d5d,_0x7f629f){const _0x4426aa=_0x21b6c0;return _0x389d5d['body']['ip']=_0x389d5d[_0x4426aa('0x22')][_0x4426aa('0x1b')]||_0x389d5d['connection']['remoteAddress']||_0x389d5d[_0x4426aa('0x28')]['remoteAddress']||_0x389d5d[_0x4426aa('0x10')]['socket'][_0x4426aa('0x1c')],openIssue(_0x389d5d['body'],_0x7f629f);};