CodeYourFuture / CodeYourFuture/Full-Stack-Project-Assessment

Delete videos endpoint

Open
#467 0 comments 0 reactions 0 assignees View on GitHub
🏕 Priority Mandatory 📅 Week 2 🔌 Backend
Dominant language
JavaScript
Stars
9
Forks
352
PR merge metrics
No merged PRs in 30d

Description

## 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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing video API routes and database access for `/api/videos/{id}`. Implement and verify deletion for an existing ID, a suitable response for a missing ID, and either a confirmation body or HTTP 204; run any available API tests covering video endpoints.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend, database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.