express-api-template v1
  1. user用户
express-api-template v1
  • 项目说明
  • user用户
    • loginByWechat微信一键登录
      POST
    • register注册
      POST
    • loginByUsercode登录
      POST
    • getCaptcha获取验证码
      GET
    • getUserProfile获取用户信息
      GET
    • verifyCaptcha校验验证码
      POST
    • getUserList获取用户列表
      GET
    • updateUserProfile更新用户信息
      PUT
    • updateUserStatus更新用户状态
      PUT
    • changeUserPassword修改用户密码
      PUT
    • uploadBio上传头像
      POST
  • permission权限
    • 权限相关说明
    • role角色
      • 新增角色
      • 获取角色列表
      • updateRole修改角色
      • deleteRole删除角色
    • 授权
      • 获取用户角色列表
      • 修改用户权限
  • department机构管理
    • addDept新增机构
      POST
    • getDeptList获取机构列表
      GET
    • deleteDept删除机构
      DELETE
    • updateDept更新机构
      PUT
  1. user用户

updateUserStatus更新用户状态

PUT
/user/updateUserStatus
Last modified:2023-09-22 09:23:10

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
uid
string 
required
用户id
status
string 
required
用户状态
1-长期用户 2-临时用户 3-失效用户 9-已禁用用户
allowedStart
string 
optional
授权开始时间(当status为2时必填)
allowedEnd
string 
optional
授权结束时间(当status为2时必填)
Example
{
    "uid": "95989d71-d927-4a06-999c-7b3f10f39edf",
    "status": "2",
    "allowedStart":"2022-06-15 17:47:45",
    "allowedEnd": "2022-07-21 17:47:45"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://127.0.0.1:3001/api/user/updateUserStatus' \
--header 'Content-Type: application/json' \
--data-raw '{
    "uid": "95989d71-d927-4a06-999c-7b3f10f39edf",
    "status": "2",
    "allowedStart":"2022-06-15 17:47:45",
    "allowedEnd": "2022-07-21 17:47:45"
}'

Responses

🟢200OK
application/json
Body
success
boolean 
required
message
string 
required
Example
{"success":true,"message":"用户状态更新成功"}
Modified at 2023-09-22 09:23:10
Previous
updateUserProfile更新用户信息
Next
changeUserPassword修改用户密码
Built with