summaryrefslogtreecommitdiffstats
path: root/controllers
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-06-02 17:06:41 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-06-02 17:06:41 +0200
commit76df9cadde7ff650979998d8c0cdff59e124d2e4 (patch)
tree34abc657f62b4add53cb12434de7a17c8165b373 /controllers
parent443bee744a867fa116ebe45f55cdedfef77ade96 (diff)
downloadmean-app-76df9cadde7ff650979998d8c0cdff59e124d2e4.zip
mean-app-76df9cadde7ff650979998d8c0cdff59e124d2e4.tar.gz
user resourcejs instead of node-restfulHEADmaster
Diffstat (limited to 'controllers')
-rw-r--r--controllers/MovieController.js9
1 files changed, 2 insertions, 7 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();