feat: implement user follow/unfollow functionality and thought retrieval by user
- Added follow and unfollow endpoints for users. - Implemented logic to retrieve thoughts by a specific user. - Updated user error handling to include cases for already following and not following. - Created persistence layer for follow relationships. - Enhanced user and thought schemas to support new features. - Added tests for follow/unfollow endpoints and thought retrieval. - Updated frontend to display thoughts and allow posting new thoughts.
This commit is contained in:
18
thoughts-backend/doc/src/thought.rs
Normal file
18
thoughts-backend/doc/src/thought.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use api::{
|
||||
models::{ApiErrorResponse, ParamsErrorResponse},
|
||||
routers::thought::*,
|
||||
};
|
||||
use models::{params::thought::CreateThoughtParams, schemas::thought::ThoughtSchema};
|
||||
use utoipa::OpenApi;
|
||||
|
||||
#[derive(OpenApi)]
|
||||
#[openapi(
|
||||
paths(thoughts_post, thoughts_delete),
|
||||
components(schemas(
|
||||
CreateThoughtParams,
|
||||
ThoughtSchema,
|
||||
ApiErrorResponse,
|
||||
ParamsErrorResponse
|
||||
))
|
||||
)]
|
||||
pub(super) struct ThoughtApi;
|
Reference in New Issue
Block a user