reuploading levels

This commit is contained in:
Reid 2023-09-20 18:46:37 -07:00
parent fd88a4e374
commit 4d8a41ba47
Signed by: reidlab
GPG key ID: 6C9EAA3364F962C8
20 changed files with 604 additions and 22 deletions

View file

@ -93,7 +93,7 @@ pub fn download_level(input: Form<FormDownloadLevel>) -> status::Custom<&'static
let xor_pass: String;
if input.gameVersion.unwrap_or(19) >= 20 {
xor_pass = helpers::encryption::cyclic_xor_string(&level.password.clone().unwrap_or(String::from("0")), "26364")
xor_pass = general_purpose::URL_SAFE.encode(helpers::encryption::cyclic_xor_string(&level.password.clone().unwrap_or(String::from("0")), "26364"))
} else {
xor_pass = level.password.clone().unwrap_or(String::from("0"));
}

View file

@ -45,7 +45,6 @@ pub fn get_levels(input: Form<FormGetLevels>) -> status::Custom<&'static str> {
let connection = &mut db::establish_connection_pg();
use crate::schema::{levels, users};
use crate::models::{Level, User};
let mut can_see_unlisted = false;

View file

@ -183,7 +183,6 @@ pub fn upload_level(input: Form<FormUploadLevel>) -> status::Custom<&'static str
editor_time_copies: input.wt2.unwrap_or(0),
song_id: song_id_val,
length: level_length_val,
length_real: level_length_secs,
objects: objects_val as i32,
coins: coins_val as i32,
has_ldm: input.ldm.unwrap_or(0).clamp(0, 1),