feat: Refactor user and thought models to use UUIDs instead of integers
- Updated user and thought models to utilize UUIDs for primary keys. - Modified persistence functions to accommodate UUIDs for user and thought IDs. - Implemented tag functionality with new Tag and ThoughtTag models. - Added migration scripts to create new tables for tags and thought-tag relationships. - Enhanced thought creation to parse hashtags and link them to thoughts. - Updated tests to reflect changes in user and thought ID types.
This commit is contained in:
@@ -3,6 +3,7 @@ use axum::Router;
|
||||
pub mod auth;
|
||||
pub mod feed;
|
||||
pub mod root;
|
||||
pub mod tag;
|
||||
pub mod thought;
|
||||
pub mod user;
|
||||
pub mod well_known;
|
||||
@@ -25,6 +26,7 @@ pub fn create_router(state: AppState) -> Router {
|
||||
.nest("/users", create_user_router())
|
||||
.nest("/thoughts", create_thought_router())
|
||||
.nest("/feed", create_feed_router())
|
||||
.nest("/tags", tag::create_tag_router())
|
||||
.with_state(state)
|
||||
.layer(cors)
|
||||
}
|
||||
|
Reference in New Issue
Block a user