The help center contains topics that provide users with advice and assistance from the support team. This endpoint permanently deletes outdated or invalid topics (help guides) from the database.
Acceptance Criteria
Endpoint is protected.
Topics can be deleted by superadmins only.
Purpose
To delete a topic previously created
Requirements
Authentication: This endpoint requires authentication.
The authentication token (Bearer ey9hk3j4g...) must be sent in the request header as Authorization.
Access Control: Only superadmins can access this endpoint.
Path Parameter: The endpoint requires an ID (of the topic to be deleted) in the path parameter.
Functionality: Only the topic with the specified ID will be removed.
Endpoints
[DELETE] /api/v1/help-center/topics/:id
Deletes a topic
Endpoint Flow
This endpoint deletes the topic with the ID specified in the path from the help_center_topics table.
Request
[DELETE] /api/v1/help-center/topics/:id
Successful Response
Status Code: 200
Description: Deleted successfully
{ }
"status_code": 204
Error Response
Status Code: 403
Description: Forbidden, Only SuperAdmins can access this endpoint.
Description
The help center contains topics that provide users with advice and assistance from the support team. This endpoint permanently deletes outdated or invalid topics (help guides) from the database.
Acceptance Criteria
Endpoint is protected. Topics can be deleted by superadmins only.
Purpose
To delete a topic previously created
Requirements
Endpoints
Endpoint Flow
This endpoint deletes the topic with the ID specified in the path from the help_center_topics table.
Request
Successful Response
Status Code: 200
Description: Deleted successfully
Error Response
Status Code: 403
Description: Forbidden, Only SuperAdmins can access this endpoint.
Status Code: 404
Description: No topic ID matches the ID param provided.
Status Code: 500
Description: Internal Server error
Validations
Database Schema
Table name: help_center_topics
id:
constraints: varchar(uuid), unique, primary-key, not null title:
constraints: varchar, unique, not null content:
constraints: text, not null, author:
constraints: varchar, unique, not null created_at:
constraints: datetime updated_at:
constraints: datetime Database diagram database diagram
Testing
Unit Tests