Built motion from commit 05106a3.|0.0.33
[motion.git] / server / api / report_chat_session / report_chat_session.controller.js
index 7d61812..1d4ba73 100644 (file)
@@ -1,113 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportChatSession = require('../../models').ReportChatSession;
-
-// Get list of report_chat_sessions
-exports.index = function(req, res) {
-  ReportChatSession
-    .findAll()
-    .then(function(report_chat_sessions) {
-      return res.status(200).send(report_chat_sessions);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  ReportChatSession
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single report_chat_session
-exports.show = function(req, res) {
-  ReportChatSession
-    .findById(req.params.id)
-    .then(function(report_chat_session) {
-      if (!report_chat_session) {
-        return res.sendStatus(404);
-      }
-      return res.send(report_chat_session);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new report_chat_session in the DB.
-exports.create = function(req, res) {
-  ReportChatSession
-    .create(req.body)
-    .then(function(report_chat_session) {
-      return res.status(201).send(report_chat_session);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing report_chat_session in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  ReportChatSession
-    .find({
-      where: {
-        id: req.params.id
-      }
-    })
-    .then(function(report_chat_session) {
-      if (!report_chat_session) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(report_chat_session, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(report_chat_session);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a report_chat_session from the DB.
-exports.destroy = function(req, res) {
-  ReportChatSession
-    .find({
-      where: {
-        id: req.params.id
-      }
-    })
-    .then(function(report_chat_session) {
-      if (!report_chat_session) {
-        return res.sendStatus(404);
-      }
-      report_chat_session.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 _0xcb50=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\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","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\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","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0xcb50[0];var _=require(_0xcb50[1]);var ReportChatSession=require(_0xcb50[3])[_0xcb50[2]];exports[_0xcb50[4]]=function(_0xb052x3,_0xb052x4){ReportChatSession[_0xcb50[9]]()[_0xcb50[8]](function(_0xb052x6){return _0xb052x4[_0xcb50[7]](200)[_0xcb50[6]](_0xb052x6)})[_0xcb50[5]](function(_0xb052x5){return handleError(_0xb052x4,_0xb052x5)})};exports[_0xcb50[10]]=function(_0xb052x3,_0xb052x4){ReportChatSession[_0xcb50[10]]()[_0xcb50[8]](function(_0xb052x7){return _0xb052x4[_0xcb50[7]](200)[_0xcb50[6]](_0xb052x7)})[_0xcb50[5]](function(_0xb052x5){return handleError(_0xb052x4,_0xb052x5)})};exports[_0xcb50[11]]=function(_0xb052x3,_0xb052x4){ReportChatSession[_0xcb50[15]](_0xb052x3[_0xcb50[14]][_0xcb50[13]])[_0xcb50[8]](function(_0xb052x8){if(!_0xb052x8){return _0xb052x4[_0xcb50[12]](404)};return _0xb052x4[_0xcb50[6]](_0xb052x8);})[_0xcb50[5]](function(_0xb052x5){return handleError(_0xb052x4,_0xb052x5)})};exports[_0xcb50[16]]=function(_0xb052x3,_0xb052x4){ReportChatSession[_0xcb50[16]](_0xb052x3[_0xcb50[17]])[_0xcb50[8]](function(_0xb052x8){return _0xb052x4[_0xcb50[7]](201)[_0xcb50[6]](_0xb052x8)})[_0xcb50[5]](function(_0xb052x5){return handleError(_0xb052x4,_0xb052x5)})};exports[_0xcb50[18]]=function(_0xb052x3,_0xb052x4){if(_0xb052x3[_0xcb50[17]][_0xcb50[13]]){delete _0xb052x3[_0xcb50[17]][_0xcb50[13]]};ReportChatSession[_0xcb50[21]]({where:{id:_0xb052x3[_0xcb50[14]][_0xcb50[13]]}})[_0xcb50[8]](function(_0xb052x8){if(!_0xb052x8){return _0xb052x4[_0xcb50[12]](404)};var _0xb052x9=_[_0xcb50[19]](_0xb052x8,_0xb052x3[_0xcb50[17]]);_0xb052x9[_0xcb50[20]]()[_0xcb50[8]](function(){return _0xb052x4[_0xcb50[7]](200)[_0xcb50[6]](_0xb052x8)})[_0xcb50[5]](function(_0xb052x5){return handleError(_0xb052x4,_0xb052x5)});})[_0xcb50[5]](function(_0xb052x5){return handleError(_0xb052x4,_0xb052x5)});};exports[_0xcb50[22]]=function(_0xb052x3,_0xb052x4){ReportChatSession[_0xcb50[21]]({where:{id:_0xb052x3[_0xcb50[14]][_0xcb50[13]]}})[_0xcb50[8]](function(_0xb052x8){if(!_0xb052x8){return _0xb052x4[_0xcb50[12]](404)};_0xb052x8[_0xcb50[22]]()[_0xcb50[8]](function(){return _0xb052x4[_0xcb50[12]](204)})[_0xcb50[5]](function(_0xb052x5){return handleError(_0xb052x4,_0xb052x5)});})[_0xcb50[5]](function(_0xb052x5){return handleError(_0xb052x4,_0xb052x5)})};function handleError(_0xb052x4,_0xb052x5){return _0xb052x4[_0xcb50[7]](500)[_0xcb50[6]](_0xb052x5)}
\ No newline at end of file