This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Shorten `POST` code - Add `DELETE` endpoint - Host images statically - Move util functions to `sentry-api` folder
- Loading branch information
Showing
9 changed files
with
59 additions
and
44 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const schema = require("../../models/sentrySchema"); | ||
|
||
module.exports = async (req, res) => { | ||
if(!await schema.exists({ _id: req.params.secret })) return res.status(400).json({ "message": "Invalid capture ID.", "code": "INVALID_ID" }); | ||
|
||
await schema.findOneAndDelete({ _id: req.params.secret }); | ||
|
||
res.status(200).json({ "success": true }); | ||
} |
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
File renamed without changes
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
delete: require("./endpoints/delete"), | ||
get: require("./endpoints/get"), | ||
post: require("./endpoints/post") | ||
} |
File renamed without changes.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.