d93627af68233e7df8683cfa0a2a66a143de6555
[motion.git] / server / api / custom_field / custom_field.controller.js
1 var _0xe33e=["\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"];_0xe33e[0];var _=require(_0xe33e[1]);var CustomField=require(_0xe33e[3])[_0xe33e[2]];var Contact=require(_0xe33e[3])[_0xe33e[4]];var util=require(_0xe33e[5]);var Util=require(_0xe33e[6]);var sequelize=require(_0xe33e[3])[_0xe33e[7]];var logger=require(_0xe33e[9])(_0xe33e[8]);exports[_0xe33e[10]]= function(_0xccc2x8,_0xccc2x9,_0xccc2xa){return CustomField[_0xe33e[17]](Util[_0xe33e[16]](_0xccc2x8[_0xe33e[15]],{ListId:null}))[_0xe33e[14]](function(_0xccc2xc){_0xccc2x9[_0xe33e[13]](200)[_0xe33e[12]](_0xccc2xc)})[_0xe33e[11]](function(_0xccc2xb){return handleError(_0xccc2x9,_0xccc2xb)})};exports[_0xe33e[18]]= function(_0xccc2x8,_0xccc2x9){return CustomField[_0xe33e[24]](_0xccc2x8[_0xe33e[23]][_0xe33e[22]])[_0xe33e[14]](function(_0xccc2xd){if(!_0xccc2xd){return _0xccc2x9[_0xe33e[19]](404)};if(_0xccc2xd[_0xe33e[20]]){return handleError(_0xccc2x9,{message:_0xe33e[21]})};return _0xccc2x9[_0xe33e[12]](_0xccc2xd)})[_0xe33e[11]](function(_0xccc2xb){return handleError(_0xccc2x9,_0xccc2xb)})};exports[_0xe33e[25]]= function(_0xccc2x8,_0xccc2x9){if(_0xccc2x8[_0xe33e[26]][_0xe33e[20]]){return handleError(_0xccc2x9,{message:_0xe33e[27]})};var _0xccc2xe;return CustomField[_0xe33e[25]](_0xccc2x8[_0xe33e[26]])[_0xe33e[14]](function(_0xccc2xd){_0xccc2xe= _0xccc2xd;_0xccc2xd[_0xe33e[29]]= _0xe33e[31]+ _0xccc2xd[_0xe33e[22]];return _0xccc2xd[_0xe33e[32]]()})[_0xe33e[14]](function(){return sequelize[_0xe33e[15]](util[_0xe33e[30]](_0xe33e[28],_0xccc2xe[_0xe33e[29]]))})[_0xe33e[14]](function(){return _0xccc2x9[_0xe33e[19]](201)})[_0xe33e[11]](function(_0xccc2xb){return handleError(_0xccc2x9,_0xccc2xb)})};exports[_0xe33e[33]]= function(_0xccc2x8,_0xccc2x9){return CustomField[_0xe33e[24]](_0xccc2x8[_0xe33e[23]][_0xe33e[22]])[_0xe33e[14]](function(_0xccc2xd){if(!_0xccc2xd){return _0xccc2x9[_0xe33e[19]](404)};if(_0xccc2xd[_0xe33e[20]]){return handleError(_0xccc2x9,{message:_0xe33e[34]})};var _0xccc2xf=_[_0xe33e[35]](_0xccc2xd,_0xccc2x8[_0xe33e[26]]);return _0xccc2xf[_0xe33e[32]]()})[_0xe33e[14]](function(_0xccc2xd){if(_0xccc2xd){return _0xccc2x9[_0xe33e[13]](200)[_0xe33e[12]](_0xccc2xd)}})[_0xe33e[11]](function(_0xccc2xb){return handleError(_0xccc2x9,_0xccc2xb)})};exports[_0xe33e[36]]= function(_0xccc2x8,_0xccc2x9){var _0xccc2x10;return CustomField[_0xe33e[24]](_0xccc2x8[_0xe33e[23]][_0xe33e[22]])[_0xe33e[14]](function(_0xccc2x13){if(!_0xccc2x13){return _0xccc2x9[_0xe33e[19]](404)};if(_0xccc2x13[_0xe33e[20]]){return handleError(_0xccc2x9,{message:_0xe33e[41]})};_0xccc2x10= _0xccc2x13;return CustomField[_0xe33e[36]]({where:{id:_0xccc2x8[_0xe33e[23]][_0xe33e[22]]}})})[_0xe33e[14]](function(){return Contact[_0xe33e[40]]()})[_0xe33e[14]](function(_0xccc2x12){return _[_0xe33e[39]](_0xccc2x12)})[_0xe33e[14]](function(_0xccc2x11){if(_[_0xe33e[37]](_0xccc2x11,_0xccc2x10[_0xe33e[29]])){return sequelize[_0xe33e[15]](util[_0xe33e[30]](_0xe33e[38],_0xccc2x10[_0xe33e[29]]))}})[_0xe33e[14]](function(){return _0xccc2x9[_0xe33e[19]](204)})[_0xe33e[11]](function(_0xccc2xb){return handleError(_0xccc2x9,_0xccc2xb)})};exports[_0xe33e[42]]= function(_0xccc2x8,_0xccc2x9){var _0xccc2x14;return CustomField[_0xe33e[47]]({where:{id:_0xccc2x8[_0xe33e[15]][_0xe33e[46]]}})[_0xe33e[14]](function(_0xccc2x17){if(!_0xccc2x17){return _0xccc2x9[_0xe33e[19]](404)};var _0xccc2xb=false;_[_0xe33e[45]](_0xccc2x17,function(_0xccc2x18){if(_0xccc2x18[_0xe33e[20]]){_0xccc2xb= true}});if(_0xccc2xb){return handleError(_0xccc2x9,{message:_0xe33e[41]})};_0xccc2x14= _0xccc2x17;return CustomField[_0xe33e[36]]({where:{id:_0xccc2x8[_0xe33e[15]][_0xe33e[46]]}})})[_0xe33e[14]](function(){return Contact[_0xe33e[40]]()})[_0xe33e[14]](function(_0xccc2x12){return _[_0xe33e[39]](_0xccc2x12)})[_0xe33e[14]](function(_0xccc2x11){var _0xccc2x15=[];_0xccc2x14[_0xe33e[45]](function(_0xccc2x16){if(_[_0xe33e[37]](_0xccc2x11,_0xccc2x16[_0xe33e[29]])){_0xccc2x15[_0xe33e[44]](sequelize[_0xe33e[15]](util[_0xe33e[30]](_0xe33e[38],_0xccc2x16[_0xe33e[29]])))}});return _0xccc2x15})[_0xe33e[43]]()[_0xe33e[14]](function(){return _0xccc2x9[_0xe33e[19]](204)})[_0xe33e[11]](function(_0xccc2xb){return handleError(_0xccc2x9,_0xccc2xb)})};function handleError(_0xccc2x9,_0xccc2xb){logger[_0xe33e[49]](_0xccc2xb[_0xe33e[48]]);return _0xccc2x9[_0xe33e[13]](500)[_0xe33e[12]](_0xccc2xb)}