Built motion from commit c2984ba.|0.0.114
[motion.git] / server / api / mail_server_in / mail_server_in.controller.js
index 4b9bb68..4a0ca13 100644 (file)
@@ -1,98 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var MailServerIn = require('../../models').MailServerIn;
-
-// Get list of mail_server_ins
-exports.index = function (req, res) {
-  MailServerIn
-    .findAll()
-    .then(function (mail_server_ins) {
-      return res.status(200).send(mail_server_ins);
-    })
-    .catch(function (err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailServerIn
-exports.show = function (req, res) {
-  MailServerIn
-    .findById(req.params.id)
-    .then(function (mailServerIn) {
-      if (!mailServerIn) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailServerIn);
-    })
-    .catch(function (err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailServerIn in the DB.
-exports.create = function (req, res) {
-  MailServerIn
-    .create(req.body)
-    .then(function (mailServerIn) {
-      return res.status(201).send(mailServerIn);
-    })
-    .catch(function (err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing mailServerIn in the DB.
-exports.update = function (req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return MailServerIn
-    .findById(req.params.id)
-    .then(function (mailServerIn) {
-      if (!mailServerIn) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailServerIn, req.body);
-      updated
-        .save()
-        .then(function () {
-          return res.status(200).send(mailServerIn);
-        })
-        .catch(function (err) {
-          console.error(err);
-          return handleError(res, err);
-        });
-    })
-    .catch(function (err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-// Deletes a mailServerIn from the DB.
-exports.destroy = function (req, res) {
-  MailServerIn
-    .findById(req.params.id)
-    .then(function (mailServerIn) {
-      if (!mailServerIn) {
-        return res.sendStatus(404);
-      }
-      mailServerIn
-        .destroy()
-        .then(function () {
-          return res.sendStatus(204);
-        })
-        .catch(function (err) {
-
-          return handleError(res, err);
-        });
-    })
-    .catch(function (err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x8b7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\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","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x8b7f[0];var _=require(_0x8b7f[1]);var Util=require(_0x8b7f[2]);var sequelize=require(_0x8b7f[4])[_0x8b7f[3]];var MailServerIn=require(_0x8b7f[4])[_0x8b7f[5]];exports[_0x8b7f[6]]= function(_0x5f54x5,_0x5f54x6){return MailServerIn[_0x8b7f[11]]()[_0x8b7f[10]](function(_0x5f54x8){return _0x5f54x6[_0x8b7f[9]](200)[_0x8b7f[8]](_0x5f54x8)})[_0x8b7f[7]](function(_0x5f54x7){return handleError(_0x5f54x6,_0x5f54x7)})};exports[_0x8b7f[12]]= function(_0x5f54x5,_0x5f54x6){return MailServerIn[_0x8b7f[16]](_0x5f54x5[_0x8b7f[15]][_0x8b7f[14]])[_0x8b7f[10]](function(_0x5f54x9){if(!_0x5f54x9){return _0x5f54x6[_0x8b7f[13]](404)};return _0x5f54x6[_0x8b7f[8]](_0x5f54x9)})[_0x8b7f[7]](function(_0x5f54x7){return handleError(_0x5f54x6,_0x5f54x7)})};exports[_0x8b7f[17]]= function(_0x5f54x5,_0x5f54x6){return MailServerIn[_0x8b7f[17]](_0x5f54x5[_0x8b7f[20]])[_0x8b7f[10]](function(_0x5f54x9){return _0x5f54x6[_0x8b7f[9]](201)[_0x8b7f[8]](_0x5f54x9)})[_0x8b7f[7]](sequelize.UniqueConstraintError,function(_0x5f54x7){return Util[_0x8b7f[19]][_0x8b7f[18]](_0x5f54x6,_0x5f54x7)})[_0x8b7f[7]](function(_0x5f54x7){return handleError(_0x5f54x6,_0x5f54x7)})};exports[_0x8b7f[21]]= function(_0x5f54x5,_0x5f54x6){if(_0x5f54x5[_0x8b7f[20]][_0x8b7f[14]]){delete _0x5f54x5[_0x8b7f[20]][_0x8b7f[14]]};return MailServerIn[_0x8b7f[16]](_0x5f54x5[_0x8b7f[15]][_0x8b7f[14]])[_0x8b7f[10]](function(_0x5f54x9){if(!_0x5f54x9){return _0x5f54x6[_0x8b7f[13]](404)};var _0x5f54xa=_[_0x8b7f[22]](_0x5f54x9,_0x5f54x5[_0x8b7f[20]]);return _0x5f54xa[_0x8b7f[23]]()})[_0x8b7f[10]](function(_0x5f54x9){return _0x5f54x6[_0x8b7f[9]](200)[_0x8b7f[8]](_0x5f54x9)})[_0x8b7f[7]](sequelize.UniqueConstraintError,function(_0x5f54x7){return Util[_0x8b7f[19]][_0x8b7f[18]](_0x5f54x6,_0x5f54x7)})[_0x8b7f[7]](function(_0x5f54x7){return handleError(_0x5f54x6,_0x5f54x7)})};exports[_0x8b7f[24]]= function(_0x5f54x5,_0x5f54x6){return MailServerIn[_0x8b7f[16]](_0x5f54x5[_0x8b7f[15]][_0x8b7f[14]])[_0x8b7f[10]](function(_0x5f54x9){if(!_0x5f54x9){return _0x5f54x6[_0x8b7f[13]](404)};return _0x5f54x9[_0x8b7f[24]]()})[_0x8b7f[7]](function(_0x5f54x7){return handleError(_0x5f54x6,_0x5f54x7)})};function handleError(_0x5f54x6,_0x5f54x7){return _0x5f54x6[_0x8b7f[9]](500)[_0x8b7f[8]](_0x5f54x7)}
\ No newline at end of file