This PR introduces the backend functionality for a Question and Answer (Q&A) forum on the website. The following features have been implemented:
Schema Definition: The schema for Question and Answer has been added to the database.
Backend Actions:
createQuestion: A backend action that allows authenticated users to create questions.
createAnswer: A backend action that allows authenticated users to answer questions.
getAnsweredQuestions: A backend action to fetch all answered questions, available to all users.
getUnansweredQuestions: A backend action to fetch all unanswered questions, available to all users.
deleteQuestion: A backend action to delete a specific question along with its related answers. This is an admin-only action.
API Endpoints:
The endpoints for testing all routes (except the admin-protected delete route) have been created. Since the admin feature is not yet implemented, the delete question action is not available in the current API testing but has been set up for future use.
Feature: Q&A Forum Backend Integration
Overview
This PR introduces the backend functionality for a Question and Answer (Q&A) forum on the website. The following features have been implemented:
Schema Definition: The schema for
Question
andAnswer
has been added to the database.Backend Actions:
createQuestion
: A backend action that allows authenticated users to create questions.createAnswer
: A backend action that allows authenticated users to answer questions.getAnsweredQuestions
: A backend action to fetch all answered questions, available to all users.getUnansweredQuestions
: A backend action to fetch all unanswered questions, available to all users.deleteQuestion
: A backend action to delete a specific question along with its related answers. This is an admin-only action.API Endpoints:
https://github.com/user-attachments/assets/3b0a9a73-cb0c-4baf-ab0f-6a621ae3520e
PR1 #465