diff --git a/Cargo.toml b/Cargo.toml index 54f5585..a03910e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] actix-web = { version = "4.5.1", features = [ "openssl" ] } rusqlite = { version = "0.30.0", features = ["bundled"] } -openssl = { version = "0.10" } +openssl = { version = "0.10", features = ["vendored"] } base64 = "0.21.5" json = "0.12.4" rand = "0.8.5" diff --git a/src/router/live.rs b/src/router/live.rs index 74886d0..57e8a5f 100644 --- a/src/router/live.rs +++ b/src/router/live.rs @@ -7,7 +7,7 @@ use crate::router::{global, userdata, items, databases}; use crate::encryption; use crate::router::clear_rate::live_completed; -pub fn retire(req: HttpRequest, body: String) -> Option { +pub fn retire(_req: HttpRequest, body: String) -> Option { let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap(); if body["live_score"]["play_time"].as_i64().unwrap_or(0) > 5 { live_completed(body["master_live_id"].as_i64().unwrap(), body["level"].as_i32().unwrap(), true, 0, 0); @@ -19,7 +19,7 @@ pub fn retire(req: HttpRequest, body: String) -> Option { }) } -pub fn reward(req: HttpRequest, _body: String) -> Option { +pub fn reward(_req: HttpRequest, _body: String) -> Option { Some(object!{ "ensured_list": [], "random_list": [] @@ -164,7 +164,7 @@ pub fn guest(req: HttpRequest, body: String) -> Option { }) } -pub fn mission(req: HttpRequest, _body: String) -> Option { +pub fn mission(_req: HttpRequest, _body: String) -> Option { //todo Some(object!{ "score_ranking": "", @@ -173,11 +173,11 @@ pub fn mission(req: HttpRequest, _body: String) -> Option { }) } -pub fn start(req: HttpRequest, _body: String) -> Option { +pub fn start(_req: HttpRequest, _body: String) -> Option { Some(array![]) } -pub fn event_start(req: HttpRequest, _body: String) -> Option { +pub fn event_start(_req: HttpRequest, _body: String) -> Option { Some(array![]) } diff --git a/src/router/lottery.rs b/src/router/lottery.rs index e1b5116..8484e4b 100644 --- a/src/router/lottery.rs +++ b/src/router/lottery.rs @@ -5,7 +5,7 @@ use rand::Rng; use crate::router::{global, userdata, items, databases}; use crate::encryption; -pub fn tutorial(req: HttpRequest, body: String) -> Option { +pub fn tutorial(_req: HttpRequest, body: String) -> Option { let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap(); let id = body["master_character_id"].to_string(); @@ -93,7 +93,7 @@ fn get_random_cards(id: i64, mut count: usize) -> JsonValue { rv } -pub fn lottery(req: HttpRequest) -> Option { +pub fn lottery(_req: HttpRequest) -> Option { Some(object!{ "lottery_list": [] }) diff --git a/src/router/purchase.rs b/src/router/purchase.rs index 5be0fa9..49f73a5 100644 --- a/src/router/purchase.rs +++ b/src/router/purchase.rs @@ -2,7 +2,7 @@ use json::{object, JsonValue}; use actix_web::{HttpRequest}; -pub fn purchase(req: HttpRequest) -> Option { +pub fn purchase(_req: HttpRequest) -> Option { Some(object!{ "product_list": [//Client will error if this is an empty array { diff --git a/src/router/user.rs b/src/router/user.rs index 8b7419c..ae0fbce 100644 --- a/src/router/user.rs +++ b/src/router/user.rs @@ -196,7 +196,7 @@ pub fn code_to_uid(code: String) -> String { .replace('M', "0") } -pub fn get_migration_code(req: HttpRequest, body: String) -> Option { +pub fn get_migration_code(_req: HttpRequest, body: String) -> Option { let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap(); let code = uid_to_code(body["user_id"].to_string()); @@ -218,7 +218,7 @@ pub fn register_password(req: HttpRequest, body: String) -> Option { Some(array![]) } -pub fn verify_migration_code(req: HttpRequest, body: String) -> Option { +pub fn verify_migration_code(_req: HttpRequest, body: String) -> Option { let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap(); let uid = code_to_uid(body["migrationCode"].to_string()).parse::().unwrap_or(0); @@ -238,7 +238,7 @@ pub fn verify_migration_code(req: HttpRequest, body: String) -> Option Option { +pub fn request_migration_code(_req: HttpRequest, body: String) -> Option { let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap(); let uid = code_to_uid(body["migrationCode"].to_string()).parse::().unwrap_or(0); @@ -253,7 +253,7 @@ pub fn request_migration_code(req: HttpRequest, body: String) -> Option Option { +pub fn migration(_req: HttpRequest, body: String) -> Option { let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap(); let user = userdata::get_name_and_rank(body["user_id"].to_string().parse::().unwrap()); @@ -292,7 +292,7 @@ pub fn sif(req: HttpRequest) -> Option { }) } -pub fn sifas_migrate(req: HttpRequest, _body: String) -> Option { +pub fn sifas_migrate(_req: HttpRequest, _body: String) -> Option { Some(object!{ "ss_migrate_status": 1, "user": null, @@ -327,7 +327,7 @@ pub fn sif_migrate(req: HttpRequest, body: String) -> Option { */ } -pub fn getregisteredplatformlist(req: HttpRequest, _body: String) -> Option { +pub fn getregisteredplatformlist(_req: HttpRequest, _body: String) -> Option { Some(object!{ "google": 0, "apple": 0,