mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
protect delete behind auth
This commit is contained in:
@@ -552,7 +552,7 @@ curl -s -g 'http://localhost:1337/api/v1/times/20{14..15}/T{13..18}:{00..15}'.js
|
||||
* Delete entries. The query logic works the same way as find/list. This
|
||||
* endpoint uses same search logic to remove records from the database.
|
||||
*/
|
||||
api.delete('/entries/:spec', function(req, res, next) {
|
||||
api.delete('/entries/:spec', wares.verifyAuthorization, function (req, res, next) {
|
||||
// if ID, prepare to query for one record
|
||||
if (isId(req.params.id)) {
|
||||
prepReqModel(req, req.params.model);
|
||||
|
||||
Reference in New Issue
Block a user