Built motion from commit 264c1c7.|0.0.142
[motion.git] / server / api / desk_configuration / desk_configuration.controller.js
index 99371d6..4c182d2 100644 (file)
@@ -1 +1 @@
-var _0xf922=["\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"];_0xf922[0];var _=require(_0xf922[1]);var DeskConfiguration=require(_0xf922[3])[_0xf922[2]];var DeskField=require(_0xf922[3])[_0xf922[4]];function handleError(_0x8362x5,_0x8362x6){_0x8362x6=_0x8362x6||500;return function(_0x8362x7){_0x8362x5[_0xf922[6]](_0x8362x6)[_0xf922[5]](_0x8362x7)}}function responseWithResult(_0x8362x5,_0x8362x6){_0x8362x6=_0x8362x6||200;return function(_0x8362x9){if(_0x8362x9){_0x8362x5[_0xf922[6]](_0x8362x6)[_0xf922[7]](_0x8362x9)}}}function handleEntityNotFound(_0x8362x5){return function(_0x8362x9){if(!_0x8362x9){_0x8362x5[_0xf922[6]](404)[_0xf922[8]]();return null};return _0x8362x9}}function saveUpdates(_0x8362xc){return function(_0x8362x9){return _0x8362x9[_0xf922[10]](_0x8362xc)[_0xf922[9]](function(_0x8362xd){return _0x8362xd})}}function removeEntity(_0x8362x5){return function(_0x8362x9){if(_0x8362x9){return _0x8362x9[_0xf922[11]]()[_0xf922[9]](function(){_0x8362x5[_0xf922[6]](204)[_0xf922[8]]()})}}}exports[_0xf922[12]]=function(_0x8362xf,_0x8362x5){DeskConfiguration[_0xf922[15]]({where:_0x8362xf[_0xf922[14]]})[_0xf922[9]](responseWithResult(_0x8362x5))[_0xf922[13]](handleError(_0x8362x5))};exports[_0xf922[16]]=function(_0x8362xf,_0x8362x5){DeskConfiguration[_0xf922[22]]({where:{id:_0x8362xf[_0xf922[18]][_0xf922[17]]},include:[{model:DeskField,as:_0xf922[19]},{model:DeskField,as:_0xf922[20]},{model:DeskField,as:_0xf922[21]}]})[_0xf922[9]](handleEntityNotFound(_0x8362x5))[_0xf922[9]](responseWithResult(_0x8362x5))[_0xf922[13]](handleError(_0x8362x5))};exports[_0xf922[23]]=function(_0x8362xf,_0x8362x5){DeskConfiguration[_0xf922[23]](_0x8362xf[_0xf922[24]])[_0xf922[9]](responseWithResult(_0x8362x5,201))[_0xf922[13]](handleError(_0x8362x5))};exports[_0xf922[25]]=function(_0x8362xf,_0x8362x5){if(_0x8362xf[_0xf922[24]][_0xf922[17]]){delete _0x8362xf[_0xf922[24]][_0xf922[17]]};DeskConfiguration[_0xf922[26]](_0x8362xf[_0xf922[18]][_0xf922[17]])[_0xf922[9]](handleEntityNotFound(_0x8362x5))[_0xf922[9]](saveUpdates(_0x8362xf[_0xf922[24]]))[_0xf922[9]](responseWithResult(_0x8362x5))[_0xf922[13]](handleError(_0x8362x5))};exports[_0xf922[11]]=function(_0x8362xf,_0x8362x5){DeskConfiguration[_0xf922[26]](_0x8362xf[_0xf922[18]][_0xf922[17]])[_0xf922[9]](handleEntityNotFound(_0x8362x5))[_0xf922[9]](removeEntity(_0x8362x5))[_0xf922[13]](handleError(_0x8362x5))};exports[_0xf922[27]]=function(_0x8362xf,_0x8362x5,_0x8362x10){var _0x8362x11;DeskConfiguration[_0xf922[26]](_0x8362xf[_0xf922[18]][_0xf922[17]])[_0xf922[9]](handleEntityNotFound(_0x8362x5))[_0xf922[9]](function(_0x8362x14){_0x8362x11=_0x8362x14;return DeskField[_0xf922[23]](_0x8362xf[_0xf922[24]])})[_0xf922[9]](function(_0x8362x13){switch(_0x8362xf[_0xf922[18]][_0xf922[35]]){case _0xf922[30]:return [_0x8362x11[_0xf922[29]](_0x8362x13),_0x8362x13];case _0xf922[32]:return [_0x8362x11[_0xf922[31]](_0x8362x13),_0x8362x13];case _0xf922[34]:return [_0x8362x11[_0xf922[33]](_0x8362x13),_0x8362x13]}})[_0xf922[28]](function(_0x8362x12,_0x8362x13){return _0x8362x5[_0xf922[6]](201)[_0xf922[7]](_0x8362x13)})[_0xf922[13]](handleError(_0x8362x5))}
\ No newline at end of file
+var _0xb501=["\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"];_0xb501[0];var _=require(_0xb501[1]);var DeskConfiguration=require(_0xb501[3])[_0xb501[2]];var DeskField=require(_0xb501[3])[_0xb501[4]];function handleError(_0x84c2x5,_0x84c2x6){_0x84c2x6= _0x84c2x6|| 500;return function(_0x84c2x7){_0x84c2x5[_0xb501[6]](_0x84c2x6)[_0xb501[5]](_0x84c2x7)}}function responseWithResult(_0x84c2x5,_0x84c2x6){_0x84c2x6= _0x84c2x6|| 200;return function(_0x84c2x9){if(_0x84c2x9){_0x84c2x5[_0xb501[6]](_0x84c2x6)[_0xb501[7]](_0x84c2x9)}}}function handleEntityNotFound(_0x84c2x5){return function(_0x84c2x9){if(!_0x84c2x9){_0x84c2x5[_0xb501[6]](404)[_0xb501[8]]();return null};return _0x84c2x9}}function saveUpdates(_0x84c2xc){return function(_0x84c2x9){return _0x84c2x9[_0xb501[10]](_0x84c2xc)[_0xb501[9]](function(_0x84c2xd){return _0x84c2xd})}}function removeEntity(_0x84c2x5){return function(_0x84c2x9){if(_0x84c2x9){return _0x84c2x9[_0xb501[11]]()[_0xb501[9]](function(){_0x84c2x5[_0xb501[6]](204)[_0xb501[8]]()})}}}exports[_0xb501[12]]= function(_0x84c2xf,_0x84c2x5){DeskConfiguration[_0xb501[15]]({where:_0x84c2xf[_0xb501[14]]})[_0xb501[9]](responseWithResult(_0x84c2x5))[_0xb501[13]](handleError(_0x84c2x5))};exports[_0xb501[16]]= function(_0x84c2xf,_0x84c2x5){DeskConfiguration[_0xb501[22]]({where:{id:_0x84c2xf[_0xb501[18]][_0xb501[17]]},include:[{model:DeskField,as:_0xb501[19]},{model:DeskField,as:_0xb501[20]},{model:DeskField,as:_0xb501[21]}]})[_0xb501[9]](handleEntityNotFound(_0x84c2x5))[_0xb501[9]](responseWithResult(_0x84c2x5))[_0xb501[13]](handleError(_0x84c2x5))};exports[_0xb501[23]]= function(_0x84c2xf,_0x84c2x5){DeskConfiguration[_0xb501[23]](_0x84c2xf[_0xb501[24]])[_0xb501[9]](responseWithResult(_0x84c2x5,201))[_0xb501[13]](handleError(_0x84c2x5))};exports[_0xb501[25]]= function(_0x84c2xf,_0x84c2x5){if(_0x84c2xf[_0xb501[24]][_0xb501[17]]){delete _0x84c2xf[_0xb501[24]][_0xb501[17]]};DeskConfiguration[_0xb501[26]](_0x84c2xf[_0xb501[18]][_0xb501[17]])[_0xb501[9]](handleEntityNotFound(_0x84c2x5))[_0xb501[9]](saveUpdates(_0x84c2xf[_0xb501[24]]))[_0xb501[9]](responseWithResult(_0x84c2x5))[_0xb501[13]](handleError(_0x84c2x5))};exports[_0xb501[11]]= function(_0x84c2xf,_0x84c2x5){DeskConfiguration[_0xb501[26]](_0x84c2xf[_0xb501[18]][_0xb501[17]])[_0xb501[9]](handleEntityNotFound(_0x84c2x5))[_0xb501[9]](removeEntity(_0x84c2x5))[_0xb501[13]](handleError(_0x84c2x5))};exports[_0xb501[27]]= function(_0x84c2xf,_0x84c2x5,_0x84c2x10){var _0x84c2x11;DeskConfiguration[_0xb501[26]](_0x84c2xf[_0xb501[18]][_0xb501[17]])[_0xb501[9]](handleEntityNotFound(_0x84c2x5))[_0xb501[9]](function(_0x84c2x14){_0x84c2x11= _0x84c2x14;return DeskField[_0xb501[23]](_0x84c2xf[_0xb501[24]])})[_0xb501[9]](function(_0x84c2x13){switch(_0x84c2xf[_0xb501[18]][_0xb501[35]]){case _0xb501[30]:return [_0x84c2x11[_0xb501[29]](_0x84c2x13),_0x84c2x13];case _0xb501[32]:return [_0x84c2x11[_0xb501[31]](_0x84c2x13),_0x84c2x13];case _0xb501[34]:return [_0x84c2x11[_0xb501[33]](_0x84c2x13),_0x84c2x13]}})[_0xb501[28]](function(_0x84c2x12,_0x84c2x13){return _0x84c2x5[_0xb501[6]](201)[_0xb501[7]](_0x84c2x13)})[_0xb501[13]](handleError(_0x84c2x5))}
\ No newline at end of file