mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-27 20:05:15 +08:00
用户注册功能实现;用户表添加email字段
This commit is contained in:
@@ -569,6 +569,79 @@ __可选__|string
|
||||
----
|
||||
|
||||
|
||||
[[_registerusingpost]]
|
||||
==== 用户注册
|
||||
....
|
||||
POST /api/user/register
|
||||
....
|
||||
|
||||
|
||||
===== 说明
|
||||
传入用户名,以及密码明文,后台计算密码SHA1值,进行注册
|
||||
|
||||
|
||||
===== 参数
|
||||
|
||||
[options="header", cols=".^2a,.^3a,.^4a"]
|
||||
|===
|
||||
|类型|名称|类型
|
||||
|**FormData**|**password** +
|
||||
__可选__|string
|
||||
|**FormData**|**username** +
|
||||
__可选__|string
|
||||
|===
|
||||
|
||||
|
||||
===== 响应
|
||||
|
||||
[options="header", cols=".^2a,.^14a,.^4a"]
|
||||
|===
|
||||
|HTTP代码|说明|类型
|
||||
|**200**|OK|<<_commonreturntype,CommonReturnType>>
|
||||
|**201**|Created|无内容
|
||||
|**401**|Unauthorized|无内容
|
||||
|**403**|Forbidden|无内容
|
||||
|**404**|Not Found|无内容
|
||||
|===
|
||||
|
||||
|
||||
===== 消耗
|
||||
|
||||
* `application/x-www-form-urlencoded`
|
||||
|
||||
|
||||
===== 生成
|
||||
|
||||
* `\*/*`
|
||||
|
||||
|
||||
===== HTTP请求示例
|
||||
|
||||
====== 请求 path
|
||||
----
|
||||
/api/user/register
|
||||
----
|
||||
|
||||
|
||||
====== 请求 formData
|
||||
[source,json]
|
||||
----
|
||||
"string"
|
||||
----
|
||||
|
||||
|
||||
===== HTTP响应示例
|
||||
|
||||
====== 响应 200
|
||||
[source,json]
|
||||
----
|
||||
{
|
||||
"data" : "object",
|
||||
"status" : "string"
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
[[_4b02b6687df4f15fab50b8d31c1fc123]]
|
||||
=== 第三方登录
|
||||
Third Party Controller
|
||||
|
Reference in New Issue
Block a user