{"action":"closed","issue":{"url":"https://api.github.com/repos/johnhof/IceBuddy/issues/51","labels_url":"https://api.github.com/repos/johnhof/IceBuddy/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/johnhof/IceBuddy/issues/51/comments","events_url":"https://api.github.com/repos/johnhof/IceBuddy/issues/51/events","html_url":"https://github.com/johnhof/IceBuddy/issues/51","id":59400814,"number":51,"title":"Remove duplicate validation in the models","user":{"login":"DuaneGarber","id":1762355,"avatar_url":"https://avatars.githubusercontent.com/u/1762355?v=3","gravatar_id":"","url":"https://api.github.com/users/DuaneGarber","html_url":"https://github.com/DuaneGarber","followers_url":"https://api.github.com/users/DuaneGarber/followers","following_url":"https://api.github.com/users/DuaneGarber/following{/other_user}","gists_url":"https://api.github.com/users/DuaneGarber/gists{/gist_id}","starred_url":"https://api.github.com/users/DuaneGarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuaneGarber/subscriptions","organizations_url":"https://api.github.com/users/DuaneGarber/orgs","repos_url":"https://api.github.com/users/DuaneGarber/repos","events_url":"https://api.github.com/users/DuaneGarber/events{/privacy}","received_events_url":"https://api.github.com/users/DuaneGarber/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"DuaneGarber","id":1762355,"avatar_url":"https://avatars.githubusercontent.com/u/1762355?v=3","gravatar_id":"","url":"https://api.github.com/users/DuaneGarber","html_url":"https://github.com/DuaneGarber","followers_url":"https://api.github.com/users/DuaneGarber/followers","following_url":"https://api.github.com/users/DuaneGarber/following{/other_user}","gists_url":"https://api.github.com/users/DuaneGarber/gists{/gist_id}","starred_url":"https://api.github.com/users/DuaneGarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuaneGarber/subscriptions","organizations_url":"https://api.github.com/users/DuaneGarber/orgs","repos_url":"https://api.github.com/users/DuaneGarber/repos","events_url":"https://api.github.com/users/DuaneGarber/events{/privacy}","received_events_url":"https://api.github.com/users/DuaneGarber/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-03-01T15:44:48Z","updated_at":"2015-03-20T04:04:11Z","closed_at":"2015-03-20T04:04:11Z","body":"Remove validation form all static and method functions, as this functionality is duplicating Mongoman capabilities.\r\n\r\n```\r\ncreate : function ( inputs, callback ) {\r\n      validate(inputs, {\r\n          name     : Joi.object().keys({\r\n            first : Joi.string().required().alphanum().min(1).max(50),\r\n            last  : Joi.string().required().alphanum().min(1).max(50)\r\n          })\r\n        },\r\n        function save (result, saveCallback) {\r\n          Mon.save('player', inputs, callback, function ( player ) {\r\n            return saveCallback(null, player);\r\n          });\r\n        },\r\n        function (error, data) {\r\n          return callback(error, data);\r\n        }\r\n      );\r\n    },\r\n```\r\n\r\nAdd this same validation back into the RESTful routes."}}