[+] Repo init, with node /register & Tests.

This commit is contained in:
VergeDX
2021-01-10 16:56:07 +08:00
parent e11b85fc71
commit eb1e549b09
16 changed files with 534 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# clock_api
## Node
**GET** `/register`
| Name | Type | In | Description |
| :--------: | :------: | :------: | :---------------------------------------------------------: |
| `username` | `string` | `header` | User's name, should match the regex `/^[a-z0-9_-]{3,16}$/`. |
| `password` | `string` | `header` | Only password's md5 will be save. |
**Response**
| Scenario | Http Status | Type | Value |
| :------: | :------------------: | :----------: | :----------------------: |
| Success | `200 OK` | `string` | User's uuid |
| Failure | `406 NOT ACCEPTABLE` | `json array` | JSON Array of Error Code |
## Error Code
| Code | Description |
| :-----: | :-----------------------------: |
| `A0101` | `username` is null. |
| `A0102` | `password` is null |
| `A0111` | `username` not match the regex. |
| `A0112` | `password` not match the regex. |