[关闭]
@fuyb1986 2018-09-05T08:59:59.000000Z 字数 790 阅读 587

管理员创建或更新账号

儿童编程


管理员创建账号

Method and URL Structure

Method Resource URL Authorization
POST /server/userinfo/signup_admin/ YES

Request Data

Name Description Required Default
username 用户名 YES
passsword 密码 YES

Request Parameter

  1. {
  2. "username": "18512345678",
  3. "password": "xxxx"
  4. }

cURL Example

  1. curl -X POST --data '{..}'
  2. http://localhost/server/userinfo/signup_admin/

JSON Response

  1. {
  2. "message": "",
  3. "code": "",
  4. "token": "xxxxx"
  5. }

管理员更新账号

Method and URL Structure

Method Resource URL Authorization
POST /server/userinfo/change_username_admin/ YES

Request Data

Name Description Required Default
username 用户名 YES
passsword 密码 YES
old_username 旧的用户名 YES

Request Parameter

  1. {
  2. "username": "18512345678",
  3. "password": "xxxx",
  4. "old_username": "1812110000"
  5. }

cURL Example

  1. curl -X POST --data '{..}'
  2. http://localhost/server/userinfo/change_username_admin/

JSON Response

  1. {
  2. "message": "",
  3. "code": "",
  4. "token": "xxxxx"
  5. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注