mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🐛 setbal was using NAME_PARAM as user
This commit is contained in:
parent
88e5cfc3d3
commit
ca6187fffc
2 changed files with 2 additions and 2 deletions
|
|
@ -51,7 +51,7 @@ public:
|
|||
//Meta Usage
|
||||
METHOD_ADD(api::ChangePassword, "/v1/user/change_password", Patch, Options, "UserFilter"); //expects ["new_pass"](string)
|
||||
METHOD_ADD(api::AdminChangePassword, "/v1/user/change_password", Patch, Options, "AdminFilter"); //expects ["name"](string) and ["new_pass"](string)
|
||||
METHOD_ADD(api::SetBal, "/v1/admin/set_balance", Patch, Options, "AdminFilter"); //expects ["amount"](32 bits)
|
||||
METHOD_ADD(api::SetBal, "/v1/admin/set_balance", Patch, Options, "AdminFilter"); //expects ["name"](string) and ["amount"](32 bits)
|
||||
|
||||
//System Usage
|
||||
METHOD_ADD(api::Help, "/v1/help", Get, Options);
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ void api::AdminChangePassword(req_args) const
|
|||
void api::SetBal(req_args) const
|
||||
{
|
||||
GEN_BODY
|
||||
RESPONSE_PARSE(bank.SetBal(NAME_PARAM, body["amount"].asUInt()));
|
||||
RESPONSE_PARSE(bank.SetBal(body["name"].asCString(), body["amount"].asUInt()));
|
||||
}
|
||||
|
||||
//System Usage
|
||||
|
|
|
|||
Loading…
Reference in a new issue