BuildForSDG / BuildForSDG/Team-250-Backends

[FEATURE] Could Zerohunger have an endpoint for deleting product

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.