BuildForSDG / BuildForSDG/Team-250-Backends
[FEATURE] Could Zerohunger have an endpoint for deleting product
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
An endpoint that let the owner delete their products. The uri of the endpoint will be `/api/v1/products/id` where id will be the products id which returns
A success for the right owner
```
status: 204 No Content
data: {
message: "Product deleted successfully"
}
```
or a failure
```
status: 403 || 400 || 401
data: {
message: "failure"
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the existing product API entry points for `/api/v1/products/{id}` and read how product ownership and authentication are handled. Add the owner-only deletion behavior, including the requested success and failure responses, then run the product API tests or add coverage for an owner and a non-owner. Done means the owner receives the specified deletion response and unauthorized attempts are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, authorization, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100