added ? to query param of setbal & sendfunds

This commit is contained in:
EntireTwix 2021-06-14 10:59:03 -07:00
parent 9b9d5cf430
commit 67a8642245
3 changed files with 5 additions and 5 deletions

View file

@ -18,14 +18,14 @@
| :------------: | :------------------------------------- | :----: | :---: | -------------------------------------------------------------------------------------------------- | | :------------: | :------------------------------------- | :----: | :---: | -------------------------------------------------------------------------------------------------- |
| GetBal | BankF/{name}/bal | GET | false | returns the balance of a given user `{name}` | | GetBal | BankF/{name}/bal | GET | false | returns the balance of a given user `{name}` |
| GetLog | BankF/{name}/log | GET | true | returns a list of last `n` number of transactions (a configurable amount) of a given user `{name}` | | GetLog | BankF/{name}/log | GET | true | returns a list of last `n` number of transactions (a configurable amount) of a given user `{name}` |
| SendFunds | BankF/{name}/send/{to}/amount={amount} | POST | true | sends `{amount}` from user `{name}` to user `{to}` | | SendFunds | BankF/{name}/send/{to}?amount={amount} | POST | true | sends `{amount}` from user `{name}` to user `{to}` |
| VerifyPassword | BankF/{name}/pass/verify | GET | true | returns `1` if the supplied user `{name}`'s password matches the password supplied in the header | | VerifyPassword | BankF/{name}/pass/verify | GET | true | returns `1` if the supplied user `{name}`'s password matches the password supplied in the header |
# Meta Usage # Meta Usage
| Name | Path | Method | A | Description | | Name | Path | Method | A | Description |
| :------------: | :------------------------------------- | :----: | :---: | ---------------------------------------------------------------------------------------------------------------------------------------- | | :------------: | :------------------------------------- | :----: | :---: | ---------------------------------------------------------------------------------------------------------------------------------------- |
| ChangePassword | BankF/{name}/pass/change | PATCH | true | if the password supplied in the header matches the user `{name}`'s password, the user's password is changed to the one given in the body | | ChangePassword | BankF/{name}/pass/change | PATCH | true | if the password supplied in the header matches the user `{name}`'s password, the user's password is changed to the one given in the body |
| SetBal | BankF/admin/{name}/bal/amount={amount} | PATCH | true | sets the balance of a give user `{name}` if the supplied password matches the admin password | | SetBal | BankF/admin/{name}/bal?amount={amount} | PATCH | true | sets the balance of a give user `{name}` if the supplied password matches the admin password |
# System Usage # System Usage
| Name | Path | Method | A | Description | | Name | Path | Method | A | Description |

View file

@ -33,12 +33,12 @@ public:
//Usage //Usage
METHOD_ADD(BankF::GetBal, "/{name}/bal", Get, Options); METHOD_ADD(BankF::GetBal, "/{name}/bal", Get, Options);
METHOD_ADD(BankF::GetLog, "/{name}/log", Get, Options); METHOD_ADD(BankF::GetLog, "/{name}/log", Get, Options);
METHOD_ADD(BankF::SendFunds, "/{name}/send/{to}/amount={amount}", Post, Options); METHOD_ADD(BankF::SendFunds, "/{name}/send/{to}?amount={amount}", Post, Options);
METHOD_ADD(BankF::VerifyPassword, "/{name}/pass/verify", Get, Options); METHOD_ADD(BankF::VerifyPassword, "/{name}/pass/verify", Get, Options);
//Meta Usage //Meta Usage
METHOD_ADD(BankF::ChangePassword, "/{name}/pass/change", Patch, Options); METHOD_ADD(BankF::ChangePassword, "/{name}/pass/change", Patch, Options);
METHOD_ADD(BankF::SetBal, "/admin/{name}/bal/amount={amount}", Patch, Options); METHOD_ADD(BankF::SetBal, "/admin/{name}/bal?amount={amount}", Patch, Options);
//System Usage //System Usage
METHOD_ADD(BankF::Help, "/help", Get, Options); METHOD_ADD(BankF::Help, "/help", Get, Options);

File diff suppressed because one or more lines are too long