mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
I am not smart
This commit is contained in:
parent
ea7376f2b5
commit
0ea25a66ee
2 changed files with 2 additions and 2 deletions
|
@ -116,8 +116,8 @@ pub fn error_resp() -> HttpResponse {
|
|||
pub fn give_item(master_item_id: i64, amount: i64, user: &mut JsonValue) {
|
||||
let mut has = false;
|
||||
for (_j, dataa) in user["item_list"].members_mut().enumerate() {
|
||||
has = true;
|
||||
if dataa["master_item_id"].as_i64().unwrap() == master_item_id {
|
||||
has = true;
|
||||
dataa["amount"] = (dataa["amount"].as_i64().unwrap() + amount).into();
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -265,8 +265,8 @@ pub fn end(req: HttpRequest, body: String) -> HttpResponse {
|
|||
|
||||
let mut has = false;
|
||||
for (_j, data) in user["point_list"].members_mut().enumerate() {
|
||||
has = true;
|
||||
if data["type"].as_i64().unwrap() == 1 {
|
||||
has = true;
|
||||
data["amount"] = (data["amount"].as_i64().unwrap() + 5000).into();
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue