-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added user routes and started generating checksum for encrypted data
- Loading branch information
Showing
11 changed files
with
210 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
### TODOs | ||
| Filename | line # | TODO | ||
|:------|:------:|:------ | ||
| gulpfile.js | 146 | Add gulp-banner to add GNU GPL notice on every js file. | ||
| controllers/Initialize.js | 18 | Test initialize controller | ||
| controllers/Users.js | 13 | Test buildProjection function | ||
| controllers/Users.js | 116 | Test limiting | ||
| controllers/Users.js | 117 | Test that response contains count of total record for the query | ||
| controllers/Users.js | 118 | Test that the last document Id in the return array of documents is in the response | ||
| controllers/Users.js | 119 | Test that sorting works | ||
| controllers/Users.js | 120 | Test that projection works | ||
| controllers/Users.js | 121 | Test that populating works | ||
| controllers/Users.js | 122 | Test that date range works | ||
| controllers/Users.js | 295 | Test users controller | ||
| controllers/Users.js | 296 | Finish users route | ||
| controllers/Users.js | 297 | Test that any deleted data is backed up | ||
| controllers/Users.js | 45 | Test that search works | ||
| controllers/Users.js | 128 | Test limiting | ||
| controllers/Users.js | 129 | Test that response contains count of total record for the query | ||
| controllers/Users.js | 130 | Test that the last document Id in the return array of documents is in the response | ||
| controllers/Users.js | 131 | Test that sorting works | ||
| controllers/Users.js | 132 | Test that projection works | ||
| controllers/Users.js | 133 | Test that populating works | ||
| controllers/Users.js | 134 | Test that date range works | ||
| controllers/Users.js | 284 | Test users controller | ||
| controllers/Users.js | 285 | Test that any deleted data is backed up | ||
| routes/index.js | 214 | Implement API Generator | ||
| routes/initialize.js | 10 | Test initialize route | ||
| routes/users.js | 43 | Test users route | ||
| services/queue/clock.js | 11 | work on a clock functionality so kue can support scheduled jobs | ||
| services/queue/jobs.js | 80 | Test saveToTrash job | ||
| services/queue/jobs.js | 93 | Test Webhook Event | ||
| services/queue/jobs.js | 137 | Test Secure Webhooks | ||
| services/queue/jobs.js | 144 | Test Unsecure Webhooks | ||
| services/queue/jobs.js | 169 | Test sendHTTPRequest Job | ||
| services/encryption/index.js | 40 | Generate checksum here | ||
| services/queue/jobs.js | 133 | Test Secure Webhooks | ||
| services/queue/jobs.js | 140 | Test Unsecure Webhooks | ||
| services/queue/jobs.js | 165 | Test sendHTTPRequest Job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,43 @@ | ||
"use strict"; | ||
var express = require('express'); | ||
var router = express.Router(); | ||
var usersController = require('../controllers/Users'); | ||
|
||
var service = 'users'; | ||
|
||
// get users or search users | ||
router.get('/'+service, usersController.find); | ||
|
||
// get user | ||
router.get('/'+service+'/:id', usersController.findOne); | ||
|
||
// To add validation, add a middlewave like the below. Works for just POST calls only | ||
// function(req,res,next){ | ||
// req._required = [ // _required should contain all the fails that are required | ||
// 'name', | ||
// 'name2' | ||
// ]; | ||
|
||
// next(); | ||
// } | ||
|
||
// create user(s) a single user object will create one user while an array of users will create multiple users | ||
router.post('/'+service, usersController.create); | ||
|
||
// update all records that matches the query | ||
router.put('/'+service, usersController.updateOne); | ||
|
||
// update a single record | ||
router.put('/'+service+'/:id', usersController.findOne); | ||
|
||
// delete all records that matches the query | ||
router.delete('/'+service, usersController.delete); | ||
|
||
// Delete a single record | ||
router.delete('/'+service+'/:id', usersController.deleteOne); | ||
|
||
// restore a previously deleted record | ||
router.post('/'+service+'/:id/restore', usersController.restore); | ||
|
||
module.exports = router; | ||
// Todo: Test users route |
Oops, something went wrong.