Closed elizase405 closed 2 weeks ago
As requested by Mark here, this article has been separated to this functionality.
As requested, Naming has been reviewed to a consistent format of 'topic'
Please take note and update your route
https://github.com/hngprojects/hng_boilerplate_nestjs/issues/111#issuecomment-2235907567
Hi pls update the testing route too
Testing route updated as requested
Description
Backend logic to handle topic Updating (Admin only)
Acceptance Criteria
Purpose
Endpoint to allow superadmin to update existing topic
Requirements
Expected Outcome
EndPoint
PATCH /api/v1/help-center/topics/:id
Authentication Required: Yes (JWT Token)
Authorization Required: Yes (Admin Role)
Headers:
Content-Type: application/json
Authorization: Bearer <JWT_TOKEN>
Request:
Response:
422 Bad Request: Invalid input data.
Database Schema
Table name: articles_table
_articleid:
title:
content:
createdAt:
updatedAt:
constraints: datetime
Database Diagram
Database image
Testing
/api/v1/help-center/topics/:id
matches the documentation.