Add created_at field to user and person models

This commit is contained in:
aprilthepink 2024-04-18 19:14:06 +02:00
parent 8a4f5b795c
commit c8077e5f29
2 changed files with 4 additions and 1 deletions

View file

@ -78,11 +78,12 @@ async fn main() -> actix_web::Result<(), anyhow::Error> {
inbox: Set(inbox.to_string()),
public_key: Set(keypair.public_key.clone()),
private_key: Set(Some(keypair.private_key.clone())),
last_refreshed_at: Set(chrono::offset::Utc::now()),
last_refreshed_at: Set(Utc::now()),
follower_count: Set(0),
following_count: Set(0),
url: Set(ap_id.to_string()),
local: Set(true),
created_at: Set(Utc::now()),
..Default::default()
};

View file

@ -131,6 +131,8 @@ impl Object for user::Model {
url: Set(json.url.to_string()),
follower_count: Set(0),
following_count: Set(0),
created_at: Set(Utc::now()),
last_refreshed_at: Set(Utc::now()),
..Default::default()
};
let model = model.insert(_data.database_connection.as_ref()).await;