21faa7d71a6858a5412a7aa88227e83e02189631
[motion.git] / server / api / custom_field / custom_field.controller.js
1 var _0x443c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x20\x74\x68\x65\x20\x6C\x69\x73\x74\x20\x41\x50\x49\x20\x74\x6F\x20\x67\x65\x74\x20\x63\x75\x73\x74\x6F\x6D\x20\x66\x69\x65\x6C\x64\x73\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x6F\x66\x20\x61\x20\x6C\x69\x73\x74\x21","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x4E\x6F\x20\x4C\x69\x73\x74\x20\x49\x44\x20\x61\x6C\x6C\x6F\x77\x65\x64\x2C\x20\x75\x73\x65\x20\x74\x68\x65\x20\x6C\x69\x73\x74\x20\x41\x50\x49\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x72\x65\x6C\x65\x61\x74\x65\x64\x20\x63\x75\x73\x74\x6F\x6D\x20\x66\x69\x65\x6C\x64\x73\x21","\x41\x4C\x54\x45\x52\x20\x54\x41\x42\x4C\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x41\x44\x44\x20\x43\x4F\x4C\x55\x4D\x4E\x20\x25\x73\x20\x56\x41\x52\x43\x48\x41\x52\x28\x32\x35\x35\x29","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x63\x66\x5F","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x55\x73\x65\x20\x74\x68\x65\x20\x6C\x69\x73\x74\x20\x41\x50\x49\x20\x74\x6F\x20\x75\x70\x64\x61\x74\x65\x20\x63\x75\x73\x74\x6F\x6D\x20\x66\x69\x65\x6C\x64\x73\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x6F\x66\x20\x61\x20\x6C\x69\x73\x74\x21","\x6D\x65\x72\x67\x65","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x41\x4C\x54\x45\x52\x20\x54\x41\x42\x4C\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x44\x52\x4F\x50\x20\x43\x4F\x4C\x55\x4D\x4E\x20\x25\x73","\x6B\x65\x79\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x55\x73\x65\x20\x74\x68\x65\x20\x6C\x69\x73\x74\x20\x41\x50\x49\x20\x74\x6F\x20\x64\x65\x6C\x65\x74\x65\x20\x63\x75\x73\x74\x6F\x6D\x20\x66\x69\x65\x6C\x64\x73\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x6F\x66\x20\x61\x20\x6C\x69\x73\x74\x21","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x69\x64\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x443c[0];var _=require(_0x443c[1]);var CustomField=require(_0x443c[3])[_0x443c[2]];var Contact=require(_0x443c[3])[_0x443c[4]];var util=require(_0x443c[5]);var Util=require(_0x443c[6]);var sequelize=require(_0x443c[3])[_0x443c[7]];var logger=require(_0x443c[9])(_0x443c[8]);exports[_0x443c[10]]= function(_0x3960x8,_0x3960x9,_0x3960xa){return CustomField[_0x443c[17]](Util[_0x443c[16]](_0x3960x8[_0x443c[15]],{ListId:null}))[_0x443c[14]](function(_0x3960xc){_0x3960x9[_0x443c[13]](200)[_0x443c[12]](_0x3960xc)})[_0x443c[11]](function(_0x3960xb){return handleError(_0x3960x9,_0x3960xb)})};exports[_0x443c[18]]= function(_0x3960x8,_0x3960x9){return CustomField[_0x443c[24]](_0x3960x8[_0x443c[23]][_0x443c[22]])[_0x443c[14]](function(_0x3960xd){if(!_0x3960xd){return _0x3960x9[_0x443c[19]](404)};if(_0x3960xd[_0x443c[20]]){return handleError(_0x3960x9,{message:_0x443c[21]})};return _0x3960x9[_0x443c[12]](_0x3960xd)})[_0x443c[11]](function(_0x3960xb){return handleError(_0x3960x9,_0x3960xb)})};exports[_0x443c[25]]= function(_0x3960x8,_0x3960x9){if(_0x3960x8[_0x443c[26]][_0x443c[20]]){return handleError(_0x3960x9,{message:_0x443c[27]})};var _0x3960xe;return CustomField[_0x443c[25]](_0x3960x8[_0x443c[26]])[_0x443c[14]](function(_0x3960xd){_0x3960xe= _0x3960xd;_0x3960xd[_0x443c[29]]= _0x443c[31]+ _0x3960xd[_0x443c[22]];return _0x3960xd[_0x443c[32]]()})[_0x443c[14]](function(){return sequelize[_0x443c[15]](util[_0x443c[30]](_0x443c[28],_0x3960xe[_0x443c[29]]))})[_0x443c[14]](function(){return _0x3960x9[_0x443c[19]](201)})[_0x443c[11]](function(_0x3960xb){return handleError(_0x3960x9,_0x3960xb)})};exports[_0x443c[33]]= function(_0x3960x8,_0x3960x9){return CustomField[_0x443c[24]](_0x3960x8[_0x443c[23]][_0x443c[22]])[_0x443c[14]](function(_0x3960xd){if(!_0x3960xd){return _0x3960x9[_0x443c[19]](404)};if(_0x3960xd[_0x443c[20]]){return handleError(_0x3960x9,{message:_0x443c[34]})};var _0x3960xf=_[_0x443c[35]](_0x3960xd,_0x3960x8[_0x443c[26]]);return _0x3960xf[_0x443c[32]]()})[_0x443c[14]](function(_0x3960xd){if(_0x3960xd){return _0x3960x9[_0x443c[13]](200)[_0x443c[12]](_0x3960xd)}})[_0x443c[11]](function(_0x3960xb){return handleError(_0x3960x9,_0x3960xb)})};exports[_0x443c[36]]= function(_0x3960x8,_0x3960x9){var _0x3960x10;return CustomField[_0x443c[24]](_0x3960x8[_0x443c[23]][_0x443c[22]])[_0x443c[14]](function(_0x3960x13){if(!_0x3960x13){return _0x3960x9[_0x443c[19]](404)};if(_0x3960x13[_0x443c[20]]){return handleError(_0x3960x9,{message:_0x443c[41]})};_0x3960x10= _0x3960x13;return CustomField[_0x443c[36]]({where:{id:_0x3960x8[_0x443c[23]][_0x443c[22]]}})})[_0x443c[14]](function(){return Contact[_0x443c[40]]()})[_0x443c[14]](function(_0x3960x12){return _[_0x443c[39]](_0x3960x12)})[_0x443c[14]](function(_0x3960x11){if(_[_0x443c[37]](_0x3960x11,_0x3960x10[_0x443c[29]])){return sequelize[_0x443c[15]](util[_0x443c[30]](_0x443c[38],_0x3960x10[_0x443c[29]]))}})[_0x443c[14]](function(){return _0x3960x9[_0x443c[19]](204)})[_0x443c[11]](function(_0x3960xb){return handleError(_0x3960x9,_0x3960xb)})};exports[_0x443c[42]]= function(_0x3960x8,_0x3960x9){var _0x3960x14;return CustomField[_0x443c[47]]({where:{id:_0x3960x8[_0x443c[15]][_0x443c[46]]}})[_0x443c[14]](function(_0x3960x17){if(!_0x3960x17){return _0x3960x9[_0x443c[19]](404)};var _0x3960xb=false;_[_0x443c[45]](_0x3960x17,function(_0x3960x18){if(_0x3960x18[_0x443c[20]]){_0x3960xb= true}});if(_0x3960xb){return handleError(_0x3960x9,{message:_0x443c[41]})};_0x3960x14= _0x3960x17;return CustomField[_0x443c[36]]({where:{id:_0x3960x8[_0x443c[15]][_0x443c[46]]}})})[_0x443c[14]](function(){return Contact[_0x443c[40]]()})[_0x443c[14]](function(_0x3960x12){return _[_0x443c[39]](_0x3960x12)})[_0x443c[14]](function(_0x3960x11){var _0x3960x15=[];_0x3960x14[_0x443c[45]](function(_0x3960x16){if(_[_0x443c[37]](_0x3960x11,_0x3960x16[_0x443c[29]])){_0x3960x15[_0x443c[44]](sequelize[_0x443c[15]](util[_0x443c[30]](_0x443c[38],_0x3960x16[_0x443c[29]])))}});return _0x3960x15})[_0x443c[43]]()[_0x443c[14]](function(){return _0x3960x9[_0x443c[19]](204)})[_0x443c[11]](function(_0x3960xb){return handleError(_0x3960x9,_0x3960xb)})};function handleError(_0x3960x9,_0x3960xb){logger[_0x443c[49]](_0x3960xb[_0x443c[48]]);return _0x3960x9[_0x443c[13]](500)[_0x443c[12]](_0x3960xb)}