Built motion from commit 0dbf6b8.|0.0.131
[motion.git] / server / api / desk_configuration / desk_configuration.controller.js
index 9b897ce..5ce06aa 100644 (file)
@@ -1 +1 @@
-var _0xc92c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0xc92c[0];var _=require(_0xc92c[1]);var DeskConfiguration=require(_0xc92c[3])[_0xc92c[2]];var DeskField=require(_0xc92c[3])[_0xc92c[4]];function handleError(_0x41f2x5,_0x41f2x6){_0x41f2x6= _0x41f2x6|| 500;return function(_0x41f2x7){_0x41f2x5[_0xc92c[6]](_0x41f2x6)[_0xc92c[5]](_0x41f2x7)}}function responseWithResult(_0x41f2x5,_0x41f2x6){_0x41f2x6= _0x41f2x6|| 200;return function(_0x41f2x9){if(_0x41f2x9){_0x41f2x5[_0xc92c[6]](_0x41f2x6)[_0xc92c[7]](_0x41f2x9)}}}function handleEntityNotFound(_0x41f2x5){return function(_0x41f2x9){if(!_0x41f2x9){_0x41f2x5[_0xc92c[6]](404)[_0xc92c[8]]();return null};return _0x41f2x9}}function saveUpdates(_0x41f2xc){return function(_0x41f2x9){return _0x41f2x9[_0xc92c[10]](_0x41f2xc)[_0xc92c[9]](function(_0x41f2xd){return _0x41f2xd})}}function removeEntity(_0x41f2x5){return function(_0x41f2x9){if(_0x41f2x9){return _0x41f2x9[_0xc92c[11]]()[_0xc92c[9]](function(){_0x41f2x5[_0xc92c[6]](204)[_0xc92c[8]]()})}}}exports[_0xc92c[12]]= function(_0x41f2xf,_0x41f2x5){DeskConfiguration[_0xc92c[15]]({where:_0x41f2xf[_0xc92c[14]]})[_0xc92c[9]](responseWithResult(_0x41f2x5))[_0xc92c[13]](handleError(_0x41f2x5))};exports[_0xc92c[16]]= function(_0x41f2xf,_0x41f2x5){DeskConfiguration[_0xc92c[22]]({where:{id:_0x41f2xf[_0xc92c[18]][_0xc92c[17]]},include:[{model:DeskField,as:_0xc92c[19]},{model:DeskField,as:_0xc92c[20]},{model:DeskField,as:_0xc92c[21]}]})[_0xc92c[9]](handleEntityNotFound(_0x41f2x5))[_0xc92c[9]](responseWithResult(_0x41f2x5))[_0xc92c[13]](handleError(_0x41f2x5))};exports[_0xc92c[23]]= function(_0x41f2xf,_0x41f2x5){DeskConfiguration[_0xc92c[23]](_0x41f2xf[_0xc92c[24]])[_0xc92c[9]](responseWithResult(_0x41f2x5,201))[_0xc92c[13]](handleError(_0x41f2x5))};exports[_0xc92c[25]]= function(_0x41f2xf,_0x41f2x5){if(_0x41f2xf[_0xc92c[24]][_0xc92c[17]]){delete _0x41f2xf[_0xc92c[24]][_0xc92c[17]]};DeskConfiguration[_0xc92c[26]](_0x41f2xf[_0xc92c[18]][_0xc92c[17]])[_0xc92c[9]](handleEntityNotFound(_0x41f2x5))[_0xc92c[9]](saveUpdates(_0x41f2xf[_0xc92c[24]]))[_0xc92c[9]](responseWithResult(_0x41f2x5))[_0xc92c[13]](handleError(_0x41f2x5))};exports[_0xc92c[11]]= function(_0x41f2xf,_0x41f2x5){DeskConfiguration[_0xc92c[26]](_0x41f2xf[_0xc92c[18]][_0xc92c[17]])[_0xc92c[9]](handleEntityNotFound(_0x41f2x5))[_0xc92c[9]](removeEntity(_0x41f2x5))[_0xc92c[13]](handleError(_0x41f2x5))};exports[_0xc92c[27]]= function(_0x41f2xf,_0x41f2x5,_0x41f2x10){var _0x41f2x11;DeskConfiguration[_0xc92c[26]](_0x41f2xf[_0xc92c[18]][_0xc92c[17]])[_0xc92c[9]](handleEntityNotFound(_0x41f2x5))[_0xc92c[9]](function(_0x41f2x14){_0x41f2x11= _0x41f2x14;return DeskField[_0xc92c[23]](_0x41f2xf[_0xc92c[24]])})[_0xc92c[9]](function(_0x41f2x13){switch(_0x41f2xf[_0xc92c[18]][_0xc92c[35]]){case _0xc92c[30]:return [_0x41f2x11[_0xc92c[29]](_0x41f2x13),_0x41f2x13];case _0xc92c[32]:return [_0x41f2x11[_0xc92c[31]](_0x41f2x13),_0x41f2x13];case _0xc92c[34]:return [_0x41f2x11[_0xc92c[33]](_0x41f2x13),_0x41f2x13]}})[_0xc92c[28]](function(_0x41f2x12,_0x41f2x13){return _0x41f2x5[_0xc92c[6]](201)[_0xc92c[7]](_0x41f2x13)})[_0xc92c[13]](handleError(_0x41f2x5))}
\ No newline at end of file
+var _0x425c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0x425c[0];var _=require(_0x425c[1]);var DeskConfiguration=require(_0x425c[3])[_0x425c[2]];var DeskField=require(_0x425c[3])[_0x425c[4]];function handleError(_0x57f4x5,_0x57f4x6){_0x57f4x6= _0x57f4x6|| 500;return function(_0x57f4x7){_0x57f4x5[_0x425c[6]](_0x57f4x6)[_0x425c[5]](_0x57f4x7)}}function responseWithResult(_0x57f4x5,_0x57f4x6){_0x57f4x6= _0x57f4x6|| 200;return function(_0x57f4x9){if(_0x57f4x9){_0x57f4x5[_0x425c[6]](_0x57f4x6)[_0x425c[7]](_0x57f4x9)}}}function handleEntityNotFound(_0x57f4x5){return function(_0x57f4x9){if(!_0x57f4x9){_0x57f4x5[_0x425c[6]](404)[_0x425c[8]]();return null};return _0x57f4x9}}function saveUpdates(_0x57f4xc){return function(_0x57f4x9){return _0x57f4x9[_0x425c[10]](_0x57f4xc)[_0x425c[9]](function(_0x57f4xd){return _0x57f4xd})}}function removeEntity(_0x57f4x5){return function(_0x57f4x9){if(_0x57f4x9){return _0x57f4x9[_0x425c[11]]()[_0x425c[9]](function(){_0x57f4x5[_0x425c[6]](204)[_0x425c[8]]()})}}}exports[_0x425c[12]]= function(_0x57f4xf,_0x57f4x5){DeskConfiguration[_0x425c[15]]({where:_0x57f4xf[_0x425c[14]]})[_0x425c[9]](responseWithResult(_0x57f4x5))[_0x425c[13]](handleError(_0x57f4x5))};exports[_0x425c[16]]= function(_0x57f4xf,_0x57f4x5){DeskConfiguration[_0x425c[22]]({where:{id:_0x57f4xf[_0x425c[18]][_0x425c[17]]},include:[{model:DeskField,as:_0x425c[19]},{model:DeskField,as:_0x425c[20]},{model:DeskField,as:_0x425c[21]}]})[_0x425c[9]](handleEntityNotFound(_0x57f4x5))[_0x425c[9]](responseWithResult(_0x57f4x5))[_0x425c[13]](handleError(_0x57f4x5))};exports[_0x425c[23]]= function(_0x57f4xf,_0x57f4x5){DeskConfiguration[_0x425c[23]](_0x57f4xf[_0x425c[24]])[_0x425c[9]](responseWithResult(_0x57f4x5,201))[_0x425c[13]](handleError(_0x57f4x5))};exports[_0x425c[25]]= function(_0x57f4xf,_0x57f4x5){if(_0x57f4xf[_0x425c[24]][_0x425c[17]]){delete _0x57f4xf[_0x425c[24]][_0x425c[17]]};DeskConfiguration[_0x425c[26]](_0x57f4xf[_0x425c[18]][_0x425c[17]])[_0x425c[9]](handleEntityNotFound(_0x57f4x5))[_0x425c[9]](saveUpdates(_0x57f4xf[_0x425c[24]]))[_0x425c[9]](responseWithResult(_0x57f4x5))[_0x425c[13]](handleError(_0x57f4x5))};exports[_0x425c[11]]= function(_0x57f4xf,_0x57f4x5){DeskConfiguration[_0x425c[26]](_0x57f4xf[_0x425c[18]][_0x425c[17]])[_0x425c[9]](handleEntityNotFound(_0x57f4x5))[_0x425c[9]](removeEntity(_0x57f4x5))[_0x425c[13]](handleError(_0x57f4x5))};exports[_0x425c[27]]= function(_0x57f4xf,_0x57f4x5,_0x57f4x10){var _0x57f4x11;DeskConfiguration[_0x425c[26]](_0x57f4xf[_0x425c[18]][_0x425c[17]])[_0x425c[9]](handleEntityNotFound(_0x57f4x5))[_0x425c[9]](function(_0x57f4x14){_0x57f4x11= _0x57f4x14;return DeskField[_0x425c[23]](_0x57f4xf[_0x425c[24]])})[_0x425c[9]](function(_0x57f4x13){switch(_0x57f4xf[_0x425c[18]][_0x425c[35]]){case _0x425c[30]:return [_0x57f4x11[_0x425c[29]](_0x57f4x13),_0x57f4x13];case _0x425c[32]:return [_0x57f4x11[_0x425c[31]](_0x57f4x13),_0x57f4x13];case _0x425c[34]:return [_0x57f4x11[_0x425c[33]](_0x57f4x13),_0x57f4x13]}})[_0x425c[28]](function(_0x57f4x12,_0x57f4x13){return _0x57f4x5[_0x425c[6]](201)[_0x425c[7]](_0x57f4x13)})[_0x425c[13]](handleError(_0x57f4x5))}
\ No newline at end of file