Fix unknown consume type 0

This commit is contained in:
Ethan O'Brien
2024-10-18 16:41:10 -05:00
parent a31d3b06d7
commit 33737819a5
3 changed files with 6 additions and 4 deletions

View File

@@ -109,7 +109,7 @@ pub fn gift(req: HttpRequest, body: String) -> Option<JsonValue> {
pub fn user_post(req: HttpRequest, body: String) -> Option<JsonValue> {
let key = global::get_login(req.headers(), &body);
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
let mut user = userdata::get_acc(&key);
if !body["name"].is_null() {
@@ -148,7 +148,7 @@ pub fn user_post(req: HttpRequest, body: String) -> Option<JsonValue> {
}
userdata::save_acc(&key, user.clone());
Some(object!{
"user": user["user"].clone(),
"clear_mission_ids": []