Refactor blog module and remove blog-related functionality
- Removed blog router and associated API endpoints. - Deleted blog persistence functions and related query parameters. - Removed blog schemas and models from the codebase. - Introduced common crate for shared types, including DateTimeWithTimeZoneWrapper. - Added Thought and Follow models with corresponding migrations. - Updated dependencies in Cargo.toml files to reflect changes. - Adjusted tests to remove references to the blog module.
This commit is contained in:
14
thoughts-backend/common/src/lib.rs
Normal file
14
thoughts-backend/common/src/lib.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use sea_orm::prelude::DateTimeWithTimeZone;
|
||||
use serde::Serialize;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
// Wrapper type for DateTimeWithTimeZone
|
||||
#[derive(Serialize, ToSchema)]
|
||||
#[schema(example = "2025-09-05T12:34:56Z")] // Example for OpenAPI
|
||||
pub struct DateTimeWithTimeZoneWrapper(String);
|
||||
|
||||
impl From<DateTimeWithTimeZone> for DateTimeWithTimeZoneWrapper {
|
||||
fn from(value: DateTimeWithTimeZone) -> Self {
|
||||
DateTimeWithTimeZoneWrapper(value.to_rfc3339())
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user