Reward user with LP when level up

This commit is contained in:
Ethan O'Brien
2024-04-13 19:12:06 -05:00
parent b154aedf79
commit ae7725c9f0
3 changed files with 24 additions and 15 deletions

View File

@ -119,7 +119,7 @@ pub fn end(req: HttpRequest, body: String) -> HttpResponse {
}
user["stamina"]["last_updated_time"] = global::timestamp().into();
user["user"]["exp"] = (user["user"]["exp"].as_i32().unwrap() + body["use_lp"].as_i32().unwrap()).into();
global::give_exp(body["use_lp"].as_i32().unwrap(), &mut user);
let live = update_live_data(&mut user, &body);