-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api: asset: delete & restore #2092
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes because filtering assets in memory is a no go. The other comments are optional.
let updatedAt = asset.status?.updatedAt; | ||
|
||
if (phase == "ready") { | ||
// If the asset is ready, we need to schedule deletion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we want to trigger this for failed assets too. Maybe there are left overs?
await req.taskScheduler.deleteAsset(asset); | ||
res.status(204); | ||
res.end(); | ||
}); | ||
|
||
app.post("/:id/restore", authorizer({}), async (req, res) => { |
Check failure
Code scanning / CodeQL
Missing rate limiting High
authorization
a94e43c
to
48b22fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this pull request do? Explain your changes. (required)
Specific updates (required)
How did you test each of these updates (required)
Does this pull request close any open issues?
Screenshots (optional)
Checklist