Built motion from commit 76eb00b9e.|1.0.24
[motion.git] / server / api / custom_field / custom_field.controller.js
1 var _0x1f21=["\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"];_0x1f21[0];var _=require(_0x1f21[1]);var CustomField=require(_0x1f21[3])[_0x1f21[2]];var Contact=require(_0x1f21[3])[_0x1f21[4]];var util=require(_0x1f21[5]);var Util=require(_0x1f21[6]);var sequelize=require(_0x1f21[3])[_0x1f21[7]];var logger=require(_0x1f21[9])(_0x1f21[8]);exports[_0x1f21[10]]= function(_0x6728x8,_0x6728x9,_0x6728xa){return CustomField[_0x1f21[17]](Util[_0x1f21[16]](_0x6728x8[_0x1f21[15]],{ListId:null}))[_0x1f21[14]](function(_0x6728xc){_0x6728x9[_0x1f21[13]](200)[_0x1f21[12]](_0x6728xc)})[_0x1f21[11]](function(_0x6728xb){return handleError(_0x6728x9,_0x6728xb)})};exports[_0x1f21[18]]= function(_0x6728x8,_0x6728x9){return CustomField[_0x1f21[24]](_0x6728x8[_0x1f21[23]][_0x1f21[22]])[_0x1f21[14]](function(_0x6728xd){if(!_0x6728xd){return _0x6728x9[_0x1f21[19]](404)};if(_0x6728xd[_0x1f21[20]]){return handleError(_0x6728x9,{message:_0x1f21[21]})};return _0x6728x9[_0x1f21[12]](_0x6728xd)})[_0x1f21[11]](function(_0x6728xb){return handleError(_0x6728x9,_0x6728xb)})};exports[_0x1f21[25]]= function(_0x6728x8,_0x6728x9){if(_0x6728x8[_0x1f21[26]][_0x1f21[20]]){return handleError(_0x6728x9,{message:_0x1f21[27]})};var _0x6728xe;return CustomField[_0x1f21[25]](_0x6728x8[_0x1f21[26]])[_0x1f21[14]](function(_0x6728xd){_0x6728xe= _0x6728xd;_0x6728xd[_0x1f21[29]]= _0x1f21[31]+ _0x6728xd[_0x1f21[22]];return _0x6728xd[_0x1f21[32]]()})[_0x1f21[14]](function(){return sequelize[_0x1f21[15]](util[_0x1f21[30]](_0x1f21[28],_0x6728xe[_0x1f21[29]]))})[_0x1f21[14]](function(){return _0x6728x9[_0x1f21[19]](201)})[_0x1f21[11]](function(_0x6728xb){return handleError(_0x6728x9,_0x6728xb)})};exports[_0x1f21[33]]= function(_0x6728x8,_0x6728x9){return CustomField[_0x1f21[24]](_0x6728x8[_0x1f21[23]][_0x1f21[22]])[_0x1f21[14]](function(_0x6728xd){if(!_0x6728xd){return _0x6728x9[_0x1f21[19]](404)};if(_0x6728xd[_0x1f21[20]]){return handleError(_0x6728x9,{message:_0x1f21[34]})};var _0x6728xf=_[_0x1f21[35]](_0x6728xd,_0x6728x8[_0x1f21[26]]);return _0x6728xf[_0x1f21[32]]()})[_0x1f21[14]](function(_0x6728xd){if(_0x6728xd){return _0x6728x9[_0x1f21[13]](200)[_0x1f21[12]](_0x6728xd)}})[_0x1f21[11]](function(_0x6728xb){return handleError(_0x6728x9,_0x6728xb)})};exports[_0x1f21[36]]= function(_0x6728x8,_0x6728x9){var _0x6728x10;return CustomField[_0x1f21[24]](_0x6728x8[_0x1f21[23]][_0x1f21[22]])[_0x1f21[14]](function(_0x6728x13){if(!_0x6728x13){return _0x6728x9[_0x1f21[19]](404)};if(_0x6728x13[_0x1f21[20]]){return handleError(_0x6728x9,{message:_0x1f21[41]})};_0x6728x10= _0x6728x13;return CustomField[_0x1f21[36]]({where:{id:_0x6728x8[_0x1f21[23]][_0x1f21[22]]}})})[_0x1f21[14]](function(){return Contact[_0x1f21[40]]()})[_0x1f21[14]](function(_0x6728x12){return _[_0x1f21[39]](_0x6728x12)})[_0x1f21[14]](function(_0x6728x11){if(_[_0x1f21[37]](_0x6728x11,_0x6728x10[_0x1f21[29]])){return sequelize[_0x1f21[15]](util[_0x1f21[30]](_0x1f21[38],_0x6728x10[_0x1f21[29]]))}})[_0x1f21[14]](function(){return _0x6728x9[_0x1f21[19]](204)})[_0x1f21[11]](function(_0x6728xb){return handleError(_0x6728x9,_0x6728xb)})};exports[_0x1f21[42]]= function(_0x6728x8,_0x6728x9){var _0x6728x14;return CustomField[_0x1f21[47]]({where:{id:_0x6728x8[_0x1f21[15]][_0x1f21[46]]}})[_0x1f21[14]](function(_0x6728x17){if(!_0x6728x17){return _0x6728x9[_0x1f21[19]](404)};var _0x6728xb=false;_[_0x1f21[45]](_0x6728x17,function(_0x6728x18){if(_0x6728x18[_0x1f21[20]]){_0x6728xb= true}});if(_0x6728xb){return handleError(_0x6728x9,{message:_0x1f21[41]})};_0x6728x14= _0x6728x17;return CustomField[_0x1f21[36]]({where:{id:_0x6728x8[_0x1f21[15]][_0x1f21[46]]}})})[_0x1f21[14]](function(){return Contact[_0x1f21[40]]()})[_0x1f21[14]](function(_0x6728x12){return _[_0x1f21[39]](_0x6728x12)})[_0x1f21[14]](function(_0x6728x11){var _0x6728x15=[];_0x6728x14[_0x1f21[45]](function(_0x6728x16){if(_[_0x1f21[37]](_0x6728x11,_0x6728x16[_0x1f21[29]])){_0x6728x15[_0x1f21[44]](sequelize[_0x1f21[15]](util[_0x1f21[30]](_0x1f21[38],_0x6728x16[_0x1f21[29]])))}});return _0x6728x15})[_0x1f21[43]]()[_0x1f21[14]](function(){return _0x6728x9[_0x1f21[19]](204)})[_0x1f21[11]](function(_0x6728xb){return handleError(_0x6728x9,_0x6728xb)})};function handleError(_0x6728x9,_0x6728xb){logger[_0x1f21[49]](_0x6728xb[_0x1f21[48]]);return _0x6728x9[_0x1f21[13]](500)[_0x1f21[12]](_0x6728xb)}