From 76df9cadde7ff650979998d8c0cdff59e124d2e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 2 Jun 2016 17:06:41 +0200 Subject: user resourcejs instead of node-restful --- controllers/MovieController.js | 9 ++------- package.json | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/controllers/MovieController.js b/controllers/MovieController.js index 5cb7681..ca0678a 100644 --- a/controllers/MovieController.js +++ b/controllers/MovieController.js @@ -1,13 +1,8 @@ -var restful = require('node-restful'); +var Resource = require('resourcejs'); module.exports = function(app, route) { - var rest = restful.model( - 'movie', - app.models.movie - ).methods(['get', 'put', 'post', 'delete']); - - rest.register(app, route); + Resource(app, '', route, app.models.movie).rest(); return function(req, res, next) { next(); diff --git a/package.json b/package.json index 5cfd188..59eed12 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,6 @@ "method-override": "^2.3.6", "mongodb": "^2.1.21", "mongoose": "^4.4.19", - "node-restful": "^0.2.5" + "resourcejs": "^1.2.0" } } -- cgit v1.1-2-g2b99