Disabled file delete GET API

40dd66297612b2a8429c8fcad2b07170a3ba582b#commitcomment-40060391
This commit is contained in:
Bobby Wibowo 2020-06-21 22:21:38 +07:00
parent 40dd662976
commit 49ec795941
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
2 changed files with 3 additions and 3 deletions

View File

@ -776,14 +776,14 @@ self.delete = async (req, res) => {
field: 'id',
values: isNaN(id) ? undefined : [id]
}
} else if (req.method === 'GET') {
} /* else if (req.method === 'GET') {
// ShareX-compatible API (or other clients that require basic GET-based API)
const name = req.params.name
body = {
field: 'name',
values: name ? [name] : undefined
}
}
} */
req.body = body
return self.bulkDelete(req, res)

View File

@ -27,7 +27,7 @@ routes.get('/uploads', (req, res, next) => uploadController.list(req, res, next)
routes.get('/uploads/:page', (req, res, next) => uploadController.list(req, res, next))
routes.post('/upload', (req, res, next) => uploadController.upload(req, res, next))
routes.post('/upload/delete', (req, res, next) => uploadController.delete(req, res, next))
routes.get('/upload/delete/:name', (req, res, next) => uploadController.delete(req, res, next))
// routes.get('/upload/delete/:name', (req, res, next) => uploadController.delete(req, res, next))
routes.post('/upload/bulkdelete', (req, res, next) => uploadController.bulkDelete(req, res, next))
routes.post('/upload/finishchunks', (req, res, next) => uploadController.finishChunks(req, res, next))
routes.post('/upload/:albumid', (req, res, next) => uploadController.upload(req, res, next))