-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add community question and answer models, schemas, and routes #1183
Open
Black-fox17
wants to merge
20
commits into
hngprojects:dev
Choose a base branch
from
Black-fox17:bugs-fixes
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,218
−9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: AbdulSalam Ayeleru <[email protected]>
Commit messages are not compliant |
samuelogboye
previously approved these changes
Mar 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The code is well-written and follows best practices
joboy-dev
requested changes
Mar 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No tests????
…uring testing and also fixed a minor spelling mistake
@joboy-dev |
…`BaseService` to encapsulate common CRUD operations. - Refactored `CommunityQuestionService` and `CommunityAnswerService` to inherit from `BaseService`. - Improved code maintainability by following the DRY principle.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Community Feature - User Q&A System
Description
This feature introduces a Community Q&A System, allowing users to ask and answer questions within the platform. It enhances user engagement by enabling knowledge-sharing and structured discussions, similar to platforms like the Microsoft Community Center.
Features
Service Implementation
CommunityQuestionService
create_question
: Users can create new questions.fetch_all
: Retrieve all questions, with optional filters.fetch_by_id
: Fetch a specific question by ID.mark_as_resolved
: Mark a question as resolved/unresolved.delete_question
: Remove a question from the database.CommunityAnswerService
create_answer
: Users can provide answers to questions.mark_as_accepted
: The question author can accept an answer.Motivation and Context
Currently, the platform lacks a dedicated Q&A system. This feature addresses that gap by:
Testing
Types of Changes
Checklist
Additional Context
The implementation leverages FastAPI and SQLAlchemy for efficient database operations, ensuring performance and security. This feature significantly enhances user engagement by providing an interactive space for discussions.