Explorar o código

[Auth] 新增找回密码,修改用户 接口

Bay %!s(int64=6) %!d(string=hai) anos
pai
achega
fc060c9247
Modificáronse 1 ficheiros con 83 adicións e 3 borrados
  1. 83 3
      api/Auth-权限.md

+ 83 - 3
api/Auth-权限.md

@@ -21,6 +21,32 @@ interface UserData {
 
 see [UserSerializer](../serializer/UserSerializer.md)
 
+## 更新当前登录用户的信息
+
+```http
+put /current
+```
+
+### Parameters
+
+```ts
+interface UserDTO {
+  phoneNumber: string;
+  email: string;
+}
+```
+
+### Response
+
+```ts
+interface UserData {
+  err: 0;
+  res: UserSerializer;
+}
+```
+
+see [UserSerializer](../serializer/UserSerializer.md)
+
 ## 登录
 
 ```http
@@ -55,17 +81,45 @@ post /verification
 
 ### Parameters
 
+````ts
+interface
+## 修改密码
+
+`STUDENT` `TEACHER`
+
+```http
+post /password/change
+````
+
+### Parameters
+
 ```ts
-interface VerificationDTO {
-  phoneNumber: string;
+interface ChangePasswordForm {
+  origin: string;
+  password: string;
+  confirm: string;
+}
+```
+
+### Response
+
+```ts
+interface EmptyData {
+  err: 0;
 }
 ```
 
+{
+phoneNumber: string;
+}
+
+````
+
 ## 注册
 
 ```http
 post /register
-```
+````
 
 ### Parameters
 
@@ -115,3 +169,29 @@ interface EmptyData {
   err: 0;
 }
 ```
+
+## 找回密码
+
+`STUDENT` `TEACHER`
+
+```http
+post /password/new
+```
+
+### Parameters
+
+```ts
+interface FindPasswordForm {
+  phoneNumber: string;
+  token: string;
+  newPassword: string;
+}
+```
+
+### Response
+
+```ts
+interface EmptyData {
+  err: 0;
+}
+```