mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Add missing /api/user
setters
This commit is contained in:
parent
9ab63227b1
commit
2adf19e414
1 changed files with 15 additions and 1 deletions
|
@ -55,6 +55,21 @@ pub fn user_post(req: HttpRequest, body: String) -> HttpResponse {
|
|||
if !body["name"].is_null() {
|
||||
user["user"]["name"] = body["name"].clone();
|
||||
}
|
||||
if !body["comment"].is_null() {
|
||||
user["user"]["comment"] = body["comment"].clone();
|
||||
}
|
||||
if !body["favorite_master_card_id"].is_null() {
|
||||
user["user"]["favorite_master_card_id"] = body["favorite_master_card_id"].clone();
|
||||
}
|
||||
if !body["guest_smile_master_card_id"].is_null() {
|
||||
user["user"]["guest_smile_master_card_id"] = body["guest_smile_master_card_id"].clone();
|
||||
}
|
||||
if !body["guest_pure_master_card_id"].is_null() {
|
||||
user["user"]["guest_pure_master_card_id"] = body["guest_pure_master_card_id"].clone();
|
||||
}
|
||||
if !body["guest_cool_master_card_id"].is_null() {
|
||||
user["user"]["guest_cool_master_card_id"] = body["guest_cool_master_card_id"].clone();
|
||||
}
|
||||
if !body["friend_request_disabled"].is_null() {
|
||||
user["user"]["friend_request_disabled"] = body["friend_request_disabled"].clone();
|
||||
}
|
||||
|
@ -62,7 +77,6 @@ pub fn user_post(req: HttpRequest, body: String) -> HttpResponse {
|
|||
user["user"]["profile_settings"] = body["profile_settings"].clone();
|
||||
}
|
||||
|
||||
|
||||
userdata::save_acc(&key, user.clone());
|
||||
|
||||
let resp = object!{
|
||||
|
|
Loading…
Add table
Reference in a new issue