-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: add avatar for user
- Loading branch information
Showing
17 changed files
with
253 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1219,9 +1219,9 @@ const docTemplate = `{ | |
], | ||
"responses": { | ||
"200": { | ||
"description": "status of response", | ||
"description": "user token", | ||
"schema": { | ||
"$ref": "#/definitions/common.ResSuccess" | ||
"$ref": "#/definitions/usermodel.Account" | ||
} | ||
}, | ||
"400": { | ||
|
@@ -1346,11 +1346,22 @@ const docTemplate = `{ | |
"auth" | ||
], | ||
"summary": "Refresh token", | ||
"parameters": [ | ||
{ | ||
"description": "refreshToken", | ||
"name": "refreshToken", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/usermodel.ReqRefreshToken" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "status of response", | ||
"description": "user token", | ||
"schema": { | ||
"$ref": "#/definitions/common.ResSuccess" | ||
"$ref": "#/definitions/usermodel.AccountWithoutRefresh" | ||
} | ||
}, | ||
"400": { | ||
|
@@ -1660,34 +1671,6 @@ const docTemplate = `{ | |
} | ||
} | ||
}, | ||
"/signOut": { | ||
"post": { | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"auth" | ||
], | ||
"summary": "SignOut", | ||
"responses": { | ||
"200": { | ||
"description": "status of response", | ||
"schema": { | ||
"$ref": "#/definitions/common.ResSuccess" | ||
} | ||
}, | ||
"400": { | ||
"description": "error", | ||
"schema": { | ||
"$ref": "#/definitions/common.AppError" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/suppliers": { | ||
"get": { | ||
"security": [ | ||
|
@@ -2790,6 +2773,10 @@ const docTemplate = `{ | |
"type": "string", | ||
"example": "bookId" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"importPrice": { | ||
"type": "integer", | ||
"example": 100000 | ||
|
@@ -4505,6 +4492,42 @@ const docTemplate = `{ | |
} | ||
} | ||
}, | ||
"tokenprovider.Token": { | ||
"type": "object", | ||
"properties": { | ||
"created": { | ||
"type": "string", | ||
"example": "2023-12-03T15:02:19.62113565Z" | ||
}, | ||
"expiry": { | ||
"type": "integer", | ||
"example": 2592000 | ||
}, | ||
"token": { | ||
"type": "string", | ||
"example": "token" | ||
} | ||
} | ||
}, | ||
"usermodel.Account": { | ||
"type": "object", | ||
"properties": { | ||
"accessToken": { | ||
"$ref": "#/definitions/tokenprovider.Token" | ||
}, | ||
"refreshToken": { | ||
"$ref": "#/definitions/tokenprovider.Token" | ||
} | ||
} | ||
}, | ||
"usermodel.AccountWithoutRefresh": { | ||
"type": "object", | ||
"properties": { | ||
"accessToken": { | ||
"$ref": "#/definitions/tokenprovider.Token" | ||
} | ||
} | ||
}, | ||
"usermodel.Filter": { | ||
"type": "object", | ||
"properties": { | ||
|
@@ -4529,6 +4552,10 @@ const docTemplate = `{ | |
"type": "string", | ||
"example": "[email protected]" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"example": "Nguyễn Văn A" | ||
|
@@ -4556,6 +4583,14 @@ const docTemplate = `{ | |
} | ||
} | ||
}, | ||
"usermodel.ReqRefreshToken": { | ||
"type": "object", | ||
"properties": { | ||
"refreshToken": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"usermodel.ReqResetPasswordUser": { | ||
"type": "object", | ||
"properties": { | ||
|
@@ -4572,6 +4607,10 @@ const docTemplate = `{ | |
"type": "string", | ||
"example": "bỏ trường này nếu không muốn update địa chỉ" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"example": "bỏ trường này nếu không muốn update tên" | ||
|
@@ -4683,6 +4722,10 @@ const docTemplate = `{ | |
"type": "string", | ||
"example": "user id" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"isActive": { | ||
"type": "boolean", | ||
"example": true | ||
|
@@ -4728,6 +4771,10 @@ const docTemplate = `{ | |
"type": "string", | ||
"example": "user id" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"isActive": { | ||
"type": "boolean", | ||
"example": true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1213,9 +1213,9 @@ | |
], | ||
"responses": { | ||
"200": { | ||
"description": "status of response", | ||
"description": "user token", | ||
"schema": { | ||
"$ref": "#/definitions/common.ResSuccess" | ||
"$ref": "#/definitions/usermodel.Account" | ||
} | ||
}, | ||
"400": { | ||
|
@@ -1340,11 +1340,22 @@ | |
"auth" | ||
], | ||
"summary": "Refresh token", | ||
"parameters": [ | ||
{ | ||
"description": "refreshToken", | ||
"name": "refreshToken", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/usermodel.ReqRefreshToken" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "status of response", | ||
"description": "user token", | ||
"schema": { | ||
"$ref": "#/definitions/common.ResSuccess" | ||
"$ref": "#/definitions/usermodel.AccountWithoutRefresh" | ||
} | ||
}, | ||
"400": { | ||
|
@@ -1654,34 +1665,6 @@ | |
} | ||
} | ||
}, | ||
"/signOut": { | ||
"post": { | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"auth" | ||
], | ||
"summary": "SignOut", | ||
"responses": { | ||
"200": { | ||
"description": "status of response", | ||
"schema": { | ||
"$ref": "#/definitions/common.ResSuccess" | ||
} | ||
}, | ||
"400": { | ||
"description": "error", | ||
"schema": { | ||
"$ref": "#/definitions/common.AppError" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/suppliers": { | ||
"get": { | ||
"security": [ | ||
|
@@ -2784,6 +2767,10 @@ | |
"type": "string", | ||
"example": "bookId" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"importPrice": { | ||
"type": "integer", | ||
"example": 100000 | ||
|
@@ -4499,6 +4486,42 @@ | |
} | ||
} | ||
}, | ||
"tokenprovider.Token": { | ||
"type": "object", | ||
"properties": { | ||
"created": { | ||
"type": "string", | ||
"example": "2023-12-03T15:02:19.62113565Z" | ||
}, | ||
"expiry": { | ||
"type": "integer", | ||
"example": 2592000 | ||
}, | ||
"token": { | ||
"type": "string", | ||
"example": "token" | ||
} | ||
} | ||
}, | ||
"usermodel.Account": { | ||
"type": "object", | ||
"properties": { | ||
"accessToken": { | ||
"$ref": "#/definitions/tokenprovider.Token" | ||
}, | ||
"refreshToken": { | ||
"$ref": "#/definitions/tokenprovider.Token" | ||
} | ||
} | ||
}, | ||
"usermodel.AccountWithoutRefresh": { | ||
"type": "object", | ||
"properties": { | ||
"accessToken": { | ||
"$ref": "#/definitions/tokenprovider.Token" | ||
} | ||
} | ||
}, | ||
"usermodel.Filter": { | ||
"type": "object", | ||
"properties": { | ||
|
@@ -4523,6 +4546,10 @@ | |
"type": "string", | ||
"example": "[email protected]" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"example": "Nguyễn Văn A" | ||
|
@@ -4550,6 +4577,14 @@ | |
} | ||
} | ||
}, | ||
"usermodel.ReqRefreshToken": { | ||
"type": "object", | ||
"properties": { | ||
"refreshToken": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"usermodel.ReqResetPasswordUser": { | ||
"type": "object", | ||
"properties": { | ||
|
@@ -4566,6 +4601,10 @@ | |
"type": "string", | ||
"example": "bỏ trường này nếu không muốn update địa chỉ" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"example": "bỏ trường này nếu không muốn update tên" | ||
|
@@ -4677,6 +4716,10 @@ | |
"type": "string", | ||
"example": "user id" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"isActive": { | ||
"type": "boolean", | ||
"example": true | ||
|
@@ -4722,6 +4765,10 @@ | |
"type": "string", | ||
"example": "user id" | ||
}, | ||
"img": { | ||
"type": "string", | ||
"example": "https://picsum.photos/200" | ||
}, | ||
"isActive": { | ||
"type": "boolean", | ||
"example": true | ||
|
Oops, something went wrong.