Skip to content

Commit

Permalink
add: new class and json examples
Browse files Browse the repository at this point in the history
  • Loading branch information
wbruno committed Jul 29, 2017
1 parent 55f6b2b commit 33faff4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class StormtrooperController {
getAll(request, response, next) {
response.send('get all stormtroopers');
};
getById(request, response, next) {
response.send('get a specific stormtrooper by id');
};
create(request, response, next) {
response.send('create a new stormtroopers');
};
update(request, response, next) {
response.send('update a stormtrooper');
};
remove(request, response, next) {
response.send('remove a stormtrooper');
};
}

module.exports = new StormtrooperController();
21 changes: 21 additions & 0 deletions capitulo_5/capitulo_5.8/controllers/StormtropperController_json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

let StormtrooperController = {
getAll: function(request, response, next) {
response.send('get all stormtroopers');
},
getById: function(request, response, next) {
response.send('get a specific stormtrooper by id');
},
create: function(request, response, next) {
response.send('create a new stormtroopers');
},
update: function(request, response, next) {
response.send('update a stormtrooper');
},
remove: function(request, response, next) {
response.send('remove a stormtrooper');
}
};

module.exports = StormtrooperController;

0 comments on commit 33faff4

Please sign in to comment.