Closed Wtower closed 8 years ago
router.get('/:<%= objectName %>Id', function(req, res, next) {
if (!req.session.login) return res.redirect('/admin/login');
if (req.params.<%= objectName %>Id) {
The current endpoints follow the Angular $resource
recommendations.
CRUD
GET /entities
POST /entities
GET /entities/:id
PUT /entities/:id
DELETE /entities/:id
Additionally:
/entities?_page=2&_perPage=20
/entities?_sortField=name&_sortDir=asc
/entities?_filters=...
, where the _filters value is the url encoded version of json filter.