chore: Use a specific date-time instead of the current one in schema examples that use it
All checks were successful
Write changelog / write-changelog (push) Successful in 22s
Update Contributors / Update Contributors (push) Successful in 3s
Rust CI / Rust CI (push) Successful in 4m53s

This is to avoid disclosing server uptime

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-07-27 05:18:40 +03:00
parent 7a81ccc0c5
commit bf1d322fe2
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -18,7 +18,7 @@
use std::str::FromStr; use std::str::FromStr;
use chrono::{DateTime, Utc}; use chrono::{DateTime, NaiveDate, NaiveDateTime, NaiveTime, Utc};
use oxidetalis_core::types::PublicKey; use oxidetalis_core::types::PublicKey;
use oxidetalis_entities::prelude::*; use oxidetalis_entities::prelude::*;
use salvo::oapi::ToSchema; use salvo::oapi::ToSchema;
@ -46,7 +46,11 @@ impl Default for WhiteListedUser {
fn default() -> Self { fn default() -> Self {
WhiteListedUser::new( WhiteListedUser::new(
PublicKey::from_str("bYhbrm61ov8GLZfskUYbsCLJTfaacMsuTBYgBABEH9dy").expect("is valid"), PublicKey::from_str("bYhbrm61ov8GLZfskUYbsCLJTfaacMsuTBYgBABEH9dy").expect("is valid"),
Utc::now(), chrono::NaiveDateTime::new(
NaiveDate::from_ymd_opt(2015, 5, 16).expect("Is valid date"),
NaiveTime::from_hms_opt(12, 17, 20).expect("Is valid time"),
)
.and_utc(),
) )
} }
} }
@ -64,7 +68,11 @@ impl Default for BlackListedUser {
fn default() -> Self { fn default() -> Self {
BlackListedUser::new( BlackListedUser::new(
PublicKey::from_str("bYhbrm61ov8GLZfskUYbsCLJTfaacMsuTBYgBABEH9dy").expect("is valid"), PublicKey::from_str("bYhbrm61ov8GLZfskUYbsCLJTfaacMsuTBYgBABEH9dy").expect("is valid"),
Utc::now(), NaiveDateTime::new(
NaiveDate::from_ymd_opt(2015, 5, 16).expect("Is valid date"),
NaiveTime::from_hms_opt(12, 17, 20).expect("Is valid time"),
)
.and_utc(),
) )
} }
} }