diff --git a/controllers/uploadController.js b/controllers/uploadController.js index be173b9..341a0d5 100644 --- a/controllers/uploadController.js +++ b/controllers/uploadController.js @@ -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) diff --git a/routes/api.js b/routes/api.js index 00ae36f..85f0d40 100644 --- a/routes/api.js +++ b/routes/api.js @@ -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))