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:
@@ -3,7 +3,9 @@ use utoipa::OpenApi;
|
||||
use utoipa_scalar::{Scalar, Servable as ScalarServable};
|
||||
use utoipa_swagger_ui::SwaggerUi;
|
||||
|
||||
mod feed;
|
||||
mod root;
|
||||
mod thought;
|
||||
mod user;
|
||||
|
||||
#[derive(OpenApi)]
|
||||
@@ -11,11 +13,15 @@ mod user;
|
||||
nest(
|
||||
(path = "/", api = root::RootApi),
|
||||
(path = "/users", api = user::UserApi),
|
||||
(path = "/thoughts", api = thought::ThoughtApi),
|
||||
(path = "/feed", api = feed::FeedApi),
|
||||
),
|
||||
tags(
|
||||
(name = "root", description = "Root API"),
|
||||
(name = "user", description = "User API"),
|
||||
)
|
||||
(name = "user", description = "User & Social API"),
|
||||
(name = "thought", description = "Thoughts API"),
|
||||
(name = "feed", description = "Feed API"),
|
||||
),
|
||||
)]
|
||||
struct _ApiDoc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user