📝 MIN_API_SUPPORT

This commit is contained in:
EntireTwix 2022-12-03 23:55:20 -08:00
parent 7850c721e5
commit da65fb678a
2 changed files with 19 additions and 18 deletions

View file

@ -67,7 +67,7 @@ cd build
### CMake Flags
there are multiple flags responsible configuring CCash:
| name | default | description | pros | cons |
| :--------------------- | :------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -------------------------------------------------------- |
| :--------------------- | :------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -------------------------------------------------------- |
| USER_SAVE_LOC | "config/users.dat" | where the users are saved | `N/A` | `N/A` |
| DROGON_CONFIG_LOC | "config/config.json" | where the config is located | `N/A` | `N/A` |
| MAX_LOG_SIZE | 100 | max number of logs per user, last `n` transactions. If both this and pre log are toggled to 0 logs will not be compiled. | large history | higher memory usage |
@ -75,7 +75,8 @@ there are multiple flags responsible configuring CCash:
| MULTI_THREADED | `true` | when `true` the program is compiled to utilize `n` threads which corresponds to how many Cores your CPU has, plus 1 for saving | speed | memory lock overhead is wasteful on single core machines |
| RETURN_ON_DEL_NAME | `N/A` | when defined, return on delete will be toggled and any accounts deleted will send their funds to the defined account, this prevent currency destruction | prevents destruction of currency | deleting accounts is made slower |
| ADD_USER_OPEN | `true` | anybody can make a new account, if set to false only admins can add accounts via `AdminAddUser()` | `N/A` | spamming new users |
| API_VERSION | 2 | api versions are backwards compatible, e.g if set to 2, v1 and v2 api endpoints will be compiled, but v3 would not. By default `API_VERSION` is set to the newest version | `N/A` | `N/A` |
| API_VERSION | 2 | the maximum api version's endpoints to be compiled. By default `API_VERSION` is set to the newest version | `N/A` | `N/A` |
| MIN_API_SUPPORT | 1 | the minimum api version's endpoints to be compiled. By default set to 1 for full backwards compatibility, setting to the same value as `API_VERSION` would disable backwards compatiblity | `N/A` | `N/A` |
EXAMPLE:
```

View file

@ -69,13 +69,13 @@
### Sytem Usage endpoints
| name | purpose | json input | path | HTTP Method | correct status | return type | return value | Jresp | Jreq | A | U |
| :----------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------------ | :---------: | :------------: | :---------: | :----------------------------------------------------------------------------------: | :----------------------: | :----------------------: | :----------------------: | :----------------------: |
| :----------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------------ | :---------: | :------------: | :---------: | :---------------------------------------------------------------------------------------------------------: | :----------------------: | :----------------------: | :----------------------: | :----------------------: |
| Help | redirects to GitHub projects Docs | `N/A` | api/v1/help | `GET` | 301 | `N/A` | `N/A` | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
| Close | saves & closes the CCash webserver | `N/A` | api/v1/admin/shutdown | `POST` | 204 | `N/A` | `N/A` | :heavy_check_mark: | :heavy_multiplication_x: | :heavy_check_mark: | :heavy_multiplication_x: |
| Contains | checks wether a user exists | `N/A` | api/v1/user/exists?name={name} | `GET` | 204 | `N/A` | `N/A` | :heavy_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
| AdminVerifyAccount | checks wether a user is the admin | `N/A` | api/v1/admin/verify_account | `POST` | 204 | `N/A` | `N/A` | :heavy_check_mark: | :heavy_multiplication_x: | :heavy_check_mark: | :heavy_multiplication_x: |
| PruneUsers | deletes users with most recent transactions older then `{time}` (if logs are enabled) and have less money then `{amount}` | {"time":int64,"amount":uint32} or just {"amount":uint32} | api/v1/admin/prune_users | `POST` | 200 | uint64 | number of users deleted | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: |
| ApiProperties | properties of the given instance | `N/A` | api/properties | `GET` | 200 | json object | {"version":uint64,"max_log":uint64} and "return_on_del":string if feature is enabled | :heavy_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
| ApiProperties | properties of the given instance | `N/A` | api/properties | `GET` | 200 | json object | {"version":uint64,"min_version":uint64_t,"max_log":uint64} and "return_on_del":string if feature is enabled | :heavy_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
### System Usage endpoin errors
| name | 401 | 404 | 406 |