mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
agh
This commit is contained in:
parent
8d301c827d
commit
1e9d0236be
5 changed files with 15 additions and 15 deletions
|
@ -6,7 +6,7 @@ edition = "2021"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-web = { version = "4.5.1", features = [ "openssl" ] }
|
actix-web = { version = "4.5.1", features = [ "openssl" ] }
|
||||||
rusqlite = { version = "0.30.0", features = ["bundled"] }
|
rusqlite = { version = "0.30.0", features = ["bundled"] }
|
||||||
openssl = { version = "0.10" }
|
openssl = { version = "0.10", features = ["vendored"] }
|
||||||
base64 = "0.21.5"
|
base64 = "0.21.5"
|
||||||
json = "0.12.4"
|
json = "0.12.4"
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
|
|
|
@ -7,7 +7,7 @@ use crate::router::{global, userdata, items, databases};
|
||||||
use crate::encryption;
|
use crate::encryption;
|
||||||
use crate::router::clear_rate::live_completed;
|
use crate::router::clear_rate::live_completed;
|
||||||
|
|
||||||
pub fn retire(req: HttpRequest, body: String) -> Option<JsonValue> {
|
pub fn retire(_req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||||
if body["live_score"]["play_time"].as_i64().unwrap_or(0) > 5 {
|
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);
|
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<JsonValue> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn reward(req: HttpRequest, _body: String) -> Option<JsonValue> {
|
pub fn reward(_req: HttpRequest, _body: String) -> Option<JsonValue> {
|
||||||
Some(object!{
|
Some(object!{
|
||||||
"ensured_list": [],
|
"ensured_list": [],
|
||||||
"random_list": []
|
"random_list": []
|
||||||
|
@ -164,7 +164,7 @@ pub fn guest(req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mission(req: HttpRequest, _body: String) -> Option<JsonValue> {
|
pub fn mission(_req: HttpRequest, _body: String) -> Option<JsonValue> {
|
||||||
//todo
|
//todo
|
||||||
Some(object!{
|
Some(object!{
|
||||||
"score_ranking": "",
|
"score_ranking": "",
|
||||||
|
@ -173,11 +173,11 @@ pub fn mission(req: HttpRequest, _body: String) -> Option<JsonValue> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn start(req: HttpRequest, _body: String) -> Option<JsonValue> {
|
pub fn start(_req: HttpRequest, _body: String) -> Option<JsonValue> {
|
||||||
Some(array![])
|
Some(array![])
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn event_start(req: HttpRequest, _body: String) -> Option<JsonValue> {
|
pub fn event_start(_req: HttpRequest, _body: String) -> Option<JsonValue> {
|
||||||
Some(array![])
|
Some(array![])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ use rand::Rng;
|
||||||
use crate::router::{global, userdata, items, databases};
|
use crate::router::{global, userdata, items, databases};
|
||||||
use crate::encryption;
|
use crate::encryption;
|
||||||
|
|
||||||
pub fn tutorial(req: HttpRequest, body: String) -> Option<JsonValue> {
|
pub fn tutorial(_req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||||
|
|
||||||
let id = body["master_character_id"].to_string();
|
let id = body["master_character_id"].to_string();
|
||||||
|
@ -93,7 +93,7 @@ fn get_random_cards(id: i64, mut count: usize) -> JsonValue {
|
||||||
rv
|
rv
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn lottery(req: HttpRequest) -> Option<JsonValue> {
|
pub fn lottery(_req: HttpRequest) -> Option<JsonValue> {
|
||||||
Some(object!{
|
Some(object!{
|
||||||
"lottery_list": []
|
"lottery_list": []
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,7 +2,7 @@ use json::{object, JsonValue};
|
||||||
use actix_web::{HttpRequest};
|
use actix_web::{HttpRequest};
|
||||||
|
|
||||||
|
|
||||||
pub fn purchase(req: HttpRequest) -> Option<JsonValue> {
|
pub fn purchase(_req: HttpRequest) -> Option<JsonValue> {
|
||||||
Some(object!{
|
Some(object!{
|
||||||
"product_list": [//Client will error if this is an empty array
|
"product_list": [//Client will error if this is an empty array
|
||||||
{
|
{
|
||||||
|
|
|
@ -196,7 +196,7 @@ pub fn code_to_uid(code: String) -> String {
|
||||||
.replace('M', "0")
|
.replace('M', "0")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_migration_code(req: HttpRequest, body: String) -> Option<JsonValue> {
|
pub fn get_migration_code(_req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||||
|
|
||||||
let code = uid_to_code(body["user_id"].to_string());
|
let code = uid_to_code(body["user_id"].to_string());
|
||||||
|
@ -218,7 +218,7 @@ pub fn register_password(req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
Some(array![])
|
Some(array![])
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn verify_migration_code(req: HttpRequest, body: String) -> Option<JsonValue> {
|
pub fn verify_migration_code(_req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||||
|
|
||||||
let uid = code_to_uid(body["migrationCode"].to_string()).parse::<i64>().unwrap_or(0);
|
let uid = code_to_uid(body["migrationCode"].to_string()).parse::<i64>().unwrap_or(0);
|
||||||
|
@ -238,7 +238,7 @@ pub fn verify_migration_code(req: HttpRequest, body: String) -> Option<JsonValue
|
||||||
"free": data_user["gem"]["free"].clone()
|
"free": data_user["gem"]["free"].clone()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
pub fn request_migration_code(req: HttpRequest, body: String) -> Option<JsonValue> {
|
pub fn request_migration_code(_req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||||
|
|
||||||
let uid = code_to_uid(body["migrationCode"].to_string()).parse::<i64>().unwrap_or(0);
|
let uid = code_to_uid(body["migrationCode"].to_string()).parse::<i64>().unwrap_or(0);
|
||||||
|
@ -253,7 +253,7 @@ pub fn request_migration_code(req: HttpRequest, body: String) -> Option<JsonValu
|
||||||
"twxuid": user["login_token"].to_string()
|
"twxuid": user["login_token"].to_string()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
pub fn migration(req: HttpRequest, body: String) -> Option<JsonValue> {
|
pub fn migration(_req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||||
|
|
||||||
let user = userdata::get_name_and_rank(body["user_id"].to_string().parse::<i64>().unwrap());
|
let user = userdata::get_name_and_rank(body["user_id"].to_string().parse::<i64>().unwrap());
|
||||||
|
@ -292,7 +292,7 @@ pub fn sif(req: HttpRequest) -> Option<JsonValue> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn sifas_migrate(req: HttpRequest, _body: String) -> Option<JsonValue> {
|
pub fn sifas_migrate(_req: HttpRequest, _body: String) -> Option<JsonValue> {
|
||||||
Some(object!{
|
Some(object!{
|
||||||
"ss_migrate_status": 1,
|
"ss_migrate_status": 1,
|
||||||
"user": null,
|
"user": null,
|
||||||
|
@ -327,7 +327,7 @@ pub fn sif_migrate(req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn getregisteredplatformlist(req: HttpRequest, _body: String) -> Option<JsonValue> {
|
pub fn getregisteredplatformlist(_req: HttpRequest, _body: String) -> Option<JsonValue> {
|
||||||
Some(object!{
|
Some(object!{
|
||||||
"google": 0,
|
"google": 0,
|
||||||
"apple": 0,
|
"apple": 0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue