feat: autoban a certain someone

This commit is contained in:
Maple 2025-07-31 02:53:40 +02:00
commit f26c04aca2
2 changed files with 10 additions and 2 deletions

View file

@ -144,6 +144,12 @@ pub async fn create_account(database: &State<Pool>, data: Xml<AccountCreationDat
.. ..
} = data.0; } = data.0;
let account_level = if user_id.to_lowercase().contains("omey"){
-1
} else {
1
};
let password = generate_password(pid, &password).ok_or(None)?; let password = generate_password(pid, &password).ok_or(None)?;
@ -162,9 +168,10 @@ pub async fn create_account(database: &State<Pool>, data: Xml<AccountCreationDat
region, region,
gender, gender,
mii_data, mii_data,
verification_code verification_code,
account_level
) VALUES ( ) VALUES (
$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14 $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15
) )
", ",
pid, pid,
@ -181,6 +188,7 @@ pub async fn create_account(database: &State<Pool>, data: Xml<AccountCreationDat
gender.as_ref(), gender.as_ref(),
data.as_ref(), data.as_ref(),
verification_code, verification_code,
account_level
).execute(database).await.unwrap(); ).execute(database).await.unwrap();
//generate_s3_images(pid, &data).await; //generate_s3_images(pid, &data).await;

0
src/reggie/mii.rs Normal file
View file