add: developer panel

This commit is contained in:
trisua 2025-06-14 20:26:54 -04:00
parent ebded00fd3
commit 39574df691
44 changed files with 982 additions and 84 deletions

View file

@ -251,7 +251,7 @@ impl User {
Self {
id: Snowflake::new().to_string().parse::<usize>().unwrap(),
created: unix_epoch_timestamp() as usize,
created: unix_epoch_timestamp(),
username,
password,
salt,
@ -262,7 +262,7 @@ impl User {
notification_count: 0,
follower_count: 0,
following_count: 0,
last_seen: unix_epoch_timestamp() as usize,
last_seen: unix_epoch_timestamp(),
totp: String::new(),
recovery_codes: Vec::new(),
post_count: 0,
@ -312,7 +312,7 @@ impl User {
(
ip.to_string(),
tetratto_shared::hash::hash(unhashed),
unix_epoch_timestamp() as usize,
unix_epoch_timestamp(),
),
)
}
@ -460,7 +460,7 @@ impl Notification {
pub fn new(title: String, content: String, owner: usize) -> Self {
Self {
id: Snowflake::new().to_string().parse::<usize>().unwrap(),
created: unix_epoch_timestamp() as usize,
created: unix_epoch_timestamp(),
title,
content,
owner,
@ -483,7 +483,7 @@ impl UserFollow {
pub fn new(initiator: usize, receiver: usize) -> Self {
Self {
id: Snowflake::new().to_string().parse::<usize>().unwrap(),
created: unix_epoch_timestamp() as usize,
created: unix_epoch_timestamp(),
initiator,
receiver,
}
@ -511,7 +511,7 @@ impl UserBlock {
pub fn new(initiator: usize, receiver: usize) -> Self {
Self {
id: Snowflake::new().to_string().parse::<usize>().unwrap(),
created: unix_epoch_timestamp() as usize,
created: unix_epoch_timestamp(),
initiator,
receiver,
}
@ -531,7 +531,7 @@ impl IpBlock {
pub fn new(initiator: usize, receiver: String) -> Self {
Self {
id: Snowflake::new().to_string().parse::<usize>().unwrap(),
created: unix_epoch_timestamp() as usize,
created: unix_epoch_timestamp(),
initiator,
receiver,
}
@ -551,7 +551,7 @@ impl IpBan {
pub fn new(ip: String, moderator: usize, reason: String) -> Self {
Self {
ip,
created: unix_epoch_timestamp() as usize,
created: unix_epoch_timestamp(),
reason,
moderator,
}
@ -572,7 +572,7 @@ impl UserWarning {
pub fn new(user: usize, moderator: usize, content: String) -> Self {
Self {
id: Snowflake::new().to_string().parse::<usize>().unwrap(),
created: unix_epoch_timestamp() as usize,
created: unix_epoch_timestamp(),
receiver: user,
moderator,
content,