-
Notifications
You must be signed in to change notification settings - Fork 53
/
addresses.js
38 lines (27 loc) · 877 Bytes
/
addresses.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var Addresses = function () {
this.respondsWith = ['html', 'json', 'xml', 'js', 'txt'];
this.index = function (req, resp, params) {
this.respond({params: params});
};
this.add = function (req, resp, params) {
this.respond({params: params});
};
this.create = function (req, resp, params) {
// Save the resource, then display index page
this.redirect({controller: this.name});
};
this.show = function (req, resp, params) {
this.respond({params: params});
};
this.edit = function (req, resp, params) {
this.respond({params: params});
};
this.update = function (req, resp, params) {
// Save the resource, then display the item page
this.redirect({controller: this.name, id: params.id});
};
this.remove = function (req, resp, params) {
this.respond({params: params});
};
};
exports.Addresses = Addresses;