Built motion from commit 12b39f1.|0.0.105
[motion.git] / server / api / user_has_team / user_has_team.controller.js
index 7f0f426..a559f72 100644 (file)
@@ -1,96 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var UserHasTeam = require('../../models').UserHasTeam;
-
-// Get list of user_has_teams
-exports.index = function(req, res) {
-  console.log(req.query);
-  UserHasTeam
-    .findAll({
-      where: req.query
-    })
-    .then(function(user_has_teams) {
-      return res.status(200).send(user_has_teams);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single user_has_team
-exports.show = function(req, res) {
-  UserHasTeam
-    .findById(req.params.id)
-    .then(function(user_has_team) {
-      if (!user_has_team) {
-        return res.sendStatus(404);
-      }
-      return res.send(user_has_team);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new user_has_team in the DB.
-exports.create = function(req, res) {
-  UserHasTeam
-    .create(req.body)
-    .then(function(user_has_team) {
-      return res.status(201).send(user_has_team);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing user_has_team in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  UserHasTeam
-    .findById(req.params.id)
-    .then(function(user_has_team) {
-      if (!user_has_team) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(user_has_team, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(user_has_team);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a user_has_team from the DB.
-exports.destroy = function(req, res) {
-  UserHasTeam
-    .findById(req.params.id)
-    .then(function(user_has_team) {
-      if (!user_has_team) {
-        return res.sendStatus(404);
-      }
-      user_has_team.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 _0xf906=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x71\x75\x65\x72\x79","\x6C\x6F\x67","\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","\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"];_0xf906[0];var _=require(_0xf906[1]);var UserHasTeam=require(_0xf906[3])[_0xf906[2]];exports[_0xf906[4]]=function(_0xd3b3x3,_0xd3b3x4){console[_0xf906[6]](_0xd3b3x3[_0xf906[5]]);UserHasTeam[_0xf906[11]]({where:_0xd3b3x3[_0xf906[5]]})[_0xf906[10]](function(_0xd3b3x6){return _0xd3b3x4[_0xf906[9]](200)[_0xf906[8]](_0xd3b3x6)})[_0xf906[7]](function(_0xd3b3x5){return handleError(_0xd3b3x4,_0xd3b3x5)})};exports[_0xf906[12]]=function(_0xd3b3x3,_0xd3b3x4){UserHasTeam[_0xf906[16]](_0xd3b3x3[_0xf906[15]][_0xf906[14]])[_0xf906[10]](function(_0xd3b3x7){if(!_0xd3b3x7){return _0xd3b3x4[_0xf906[13]](404)};return _0xd3b3x4[_0xf906[8]](_0xd3b3x7)})[_0xf906[7]](function(_0xd3b3x5){return handleError(_0xd3b3x4,_0xd3b3x5)})};exports[_0xf906[17]]=function(_0xd3b3x3,_0xd3b3x4){UserHasTeam[_0xf906[17]](_0xd3b3x3[_0xf906[18]])[_0xf906[10]](function(_0xd3b3x7){return _0xd3b3x4[_0xf906[9]](201)[_0xf906[8]](_0xd3b3x7)})[_0xf906[7]](function(_0xd3b3x5){return handleError(_0xd3b3x4,_0xd3b3x5)})};exports[_0xf906[19]]=function(_0xd3b3x3,_0xd3b3x4){if(_0xd3b3x3[_0xf906[18]][_0xf906[14]]){delete _0xd3b3x3[_0xf906[18]][_0xf906[14]]};UserHasTeam[_0xf906[16]](_0xd3b3x3[_0xf906[15]][_0xf906[14]])[_0xf906[10]](function(_0xd3b3x7){if(!_0xd3b3x7){return _0xd3b3x4[_0xf906[13]](404)};var _0xd3b3x8=_[_0xf906[20]](_0xd3b3x7,_0xd3b3x3[_0xf906[18]]);_0xd3b3x8[_0xf906[21]]()[_0xf906[10]](function(){return _0xd3b3x4[_0xf906[9]](200)[_0xf906[8]](_0xd3b3x7)})[_0xf906[7]](function(_0xd3b3x5){return handleError(_0xd3b3x4,_0xd3b3x5)})})[_0xf906[7]](function(_0xd3b3x5){return handleError(_0xd3b3x4,_0xd3b3x5)})};exports[_0xf906[22]]=function(_0xd3b3x3,_0xd3b3x4){UserHasTeam[_0xf906[16]](_0xd3b3x3[_0xf906[15]][_0xf906[14]])[_0xf906[10]](function(_0xd3b3x7){if(!_0xd3b3x7){return _0xd3b3x4[_0xf906[13]](404)};_0xd3b3x7[_0xf906[22]]()[_0xf906[10]](function(){return _0xd3b3x4[_0xf906[13]](204)})[_0xf906[7]](function(_0xd3b3x5){return handleError(_0xd3b3x4,_0xd3b3x5)})})[_0xf906[7]](function(_0xd3b3x5){return handleError(_0xd3b3x4,_0xd3b3x5)})};function handleError(_0xd3b3x4,_0xd3b3x5){return _0xd3b3x4[_0xf906[9]](500)[_0xf906[8]](_0xd3b3x5)}
\ No newline at end of file