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

Delete videos endpoint #18

Open
3 tasks done
aishaathmanlali opened this issue May 20, 2024 · 0 comments
Open
3 tasks done

Delete videos endpoint #18

aishaathmanlali opened this issue May 20, 2024 · 0 comments
Assignees
Labels

Comments

@aishaathmanlali
Copy link
Owner

aishaathmanlali commented May 20, 2024

From Full-Stack-Project-Assessment created by Dedekind561: CodeYourFuture#467

Description

HTTP Method: DELETE

Route: /api/videos/{id}

This endpoint is used to delete a specific video from the database. DELETE endpoints don't require a request body, and they don't even need to return a response body! While you can return a confirmation message: however, if you don't want to, you can use the HTTP status code 204 to tell the client that the action was successful, but there is no response body.

To make the endpoint nicer, you can also change it so if you try to call this endpoint on an id that doesn't exist, the system may respond with a HTTP 404 status code designating that the video did not exist in the first place or was already deleted.

Acceptance Criteria

  • A DELETE /api/videos/{id} backend endpoint is implemented to remove specific videos.
  • The endpoint handles non-existent video IDs gracefully, returning an appropriate HTTP status code (e.g., 404).
  • The endpoint returns a confirmation message or uses an HTTP status code 204 to indicate successful deletion.
@aishaathmanlali aishaathmanlali transferred this issue from aishaathmanlali/Coursework-Planner Jun 8, 2024
@aishaathmanlali aishaathmanlali moved this from 🔖 Ready to 🏗 In progress in FULL-STACK ASSESSMENT PLANNER Jun 8, 2024
@aishaathmanlali aishaathmanlali self-assigned this Jun 8, 2024
@aishaathmanlali aishaathmanlali moved this from 🏗 In progress to 👀 In review in FULL-STACK ASSESSMENT PLANNER Jun 11, 2024
@aishaathmanlali aishaathmanlali moved this from 👀 In review to ✅ Done in FULL-STACK ASSESSMENT PLANNER Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

1 participant