mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-19 01:22:14 +11:00
password for add user moved to header
This commit is contained in:
parent
c40c63252c
commit
7dd215292f
2 changed files with 2 additions and 3 deletions
2
help.md
2
help.md
|
|
@ -39,7 +39,7 @@
|
||||||
# User Management
|
# User Management
|
||||||
| Name | Path | Method | A | Description |
|
| Name | Path | Method | A | Description |
|
||||||
| :----------: | :------------------------------------- | :----: | :---: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| :----------: | :------------------------------------- | :----: | :---: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| AddUser | /user/{name} | POST | true | registers a user with the name `{name}`, balance of 0 and a password of the password supplied in the header |
|
| AddUser | /user/{name} | POST | true | registers a user with the name `{name}`, balance of 0 and a password of the password supplied in the body |
|
||||||
| AdminAddUser | /admin/user/{name}?init_bal={init_bal} | POST | true | if the password supplied in the header matches the admin password, then it registers a user with the name `{name}`, balance of `init_bal` and a password supplied by the body of the request |
|
| AdminAddUser | /admin/user/{name}?init_bal={init_bal} | POST | true | if the password supplied in the header matches the admin password, then it registers a user with the name `{name}`, balance of `init_bal` and a password supplied by the body of the request |
|
||||||
| DelUser | /user/{name} | DELETE | true | if the password supplied in the header matches the user `{name}`'s password, then the user is deleted |
|
| DelUser | /user/{name} | DELETE | true | if the password supplied in the header matches the user `{name}`'s password, then the user is deleted |
|
||||||
| AdminDelUser | /admin/user/{name} | DELETE | true | if the password supplied in the header matches the admin password, then the user is deleted |
|
| AdminDelUser | /admin/user/{name} | DELETE | true | if the password supplied in the header matches the admin password, then the user is deleted |
|
||||||
|
|
@ -55,8 +55,7 @@ void BankF::Close(req_args) const
|
||||||
}
|
}
|
||||||
void BankF::AddUser(req_args, std::string &&name) const
|
void BankF::AddUser(req_args, std::string &&name) const
|
||||||
{
|
{
|
||||||
PASS_HEADER
|
JSON(bank.AddUser(std::move(name), std::string(req->getBody())));
|
||||||
JSON(bank.AddUser(std::move(name), std::move(pass)));
|
|
||||||
}
|
}
|
||||||
void BankF::AdminAddUser(req_args, std::string &&name, uint32_t init_bal) const
|
void BankF::AdminAddUser(req_args, std::string &&name, uint32_t init_bal) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue