Skip to content

Latest commit

 

History

History
70 lines (64 loc) · 758 Bytes

api.md

File metadata and controls

70 lines (64 loc) · 758 Bytes

用户模块功能及 Api

默认返回值

{
  "ok": true,
  "error": ""
}

1. 用户登录

  • Api: /login
  • Method: POST
  • RequestBody:
{
  "username": "",
  "password": ""
}

2. 添加用户

  • Api: /users
  • Method: POST
  • RequestBody:
{
  "username": "",
  "password": ""
}

3. 删除用户

  • Api: /users/id/:id
  • Method: DELETE

4. 修改用户

  • Api: /users/id/:id
  • Method: PUT
{
  "username": "",
  "password": ""
}

5. 查询用户

  • Api: /users/id/:id
  • Method: GET
  • Response:
{
  "id": 0,
  "username": "",
  "password": ""
  }

6. 查询所有用户

  • Api: /users
  • Method: GET
  • Response:
[
{
  "id": 0,
  "username": "",
  "password": ""
  }
]