This could be an existing issue or a linear ticket
Github Issue Example: My PR Closes #{ISSUE}
Linear Ticket Example: Fixes ID-#{ISSUE}
Changes proposed
Added logic to check for duplicate FAQ entries in the database.
Updated createFaq method in FAQService to ensure unique FAQ questions.
Handled QueryFailedError for database operations.
The response body should be:
{
"status_code": 201,
"message": "FAQ created successfully",
"data": {
"question": "What is the return policy?",
"answer": "Our return policy allows returns within 30 days of purchase.",
"category": "Policies",
"id": "2dea5fe9-c635-4e6e-a059-ef3836b20661",
"created_at": "2024-08-09T20:07:53.285Z",
"updated_at": "2024-08-09T20:07:53.285Z"
}
}
Fixes Issue/Linear Ticket
Changes proposed
Added logic to check for duplicate FAQ entries in the database. Updated createFaq method in FAQService to ensure unique FAQ questions. Handled QueryFailedError for database operations.
The response body should be:
also the error message match
Check List (Check all the applicable boxes)
:rotating_light:Please review the [style guide for contributing](add link here) and [guidelines for contributing](add link here) to this repository.
Screenshots/ Videos