Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ If not, this:

## Delete a document

Send a GET-request to the /documents/delete-route + the key of the wanted document + the deleteSecret
Send a DELETE-request to the /documents/delete-route + the key of the wanted document + the deleteSecret
(for example https://just-paste.it/documents/delete/$key/$deleteSecret).

If everything succeeded, you'll get the following response:
Expand Down
4 changes: 2 additions & 2 deletions routes/documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ router.get("/:key", async (request, response) => {
}
});

router.get("/delete/:key/:deleteSecret", rateLimitHandler, async (request, response) => {
router.delete("/delete/:key/:deleteSecret", rateLimitHandler, async (request, response) => {
const key = request.params.key;
const deleteSecret = request.params.deleteSecret;

Expand All @@ -93,4 +93,4 @@ router.get("/delete/:key/:deleteSecret", rateLimitHandler, async (request, respo
module.exports = storage => {
documentStorage = storage;
return router;
};
};