Skip to content
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

Faulty logic in remove-media api handler #1263

Closed
vnugent opened this issue Jan 27, 2025 · 0 comments
Closed

Faulty logic in remove-media api handler #1263

vnugent opened this issue Jan 27, 2025 · 0 comments
Assignees
Labels
bug Something isn't working P2 regression Déjà vu

Comments

@vnugent
Copy link
Contributor

vnugent commented Jan 27, 2025

Steps to Reproduce

  1. Go to user gallery and delete a photo (one with any tags)
  2. Photo seems to be deleted but it's not because the route handler code calls the wrong function to parse the filename from query string.

The call to prepareFilenameFromRequest() should only be used to get a randomized file name, not when deleting
https://github.com/OpenBeta/open-tacos/blob/develop/src/app/api/user/remove-media/route.ts#L12

introduced by #1226

@vnugent vnugent added bug Something isn't working P2 regression Déjà vu labels Jan 27, 2025
@vnugent vnugent self-assigned this Jan 27, 2025
@vnugent vnugent closed this as completed Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 regression Déjà vu
Projects
None yet
Development

No branches or pull requests

1 participant