- route definition
- Url: /api/v1/profile
- Method: GET
- Request:
ProfileGetRequest - Response:
ProfileGetResponse
- request definition
type ProfileGetRequest struct {
}
- response definition
type ProfileGetResponse struct {
Id int64 `json:"id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Email string `json:"email"`
Phone string `json:"phone"`
Roles []string `json:"roles"`
Avatar string `json:"avatar"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type ProfileInfo struct {
Id int64 `json:"id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Email string `json:"email"`
Phone string `json:"phone"`
Roles []string `json:"roles"`
Avatar string `json:"avatar"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
- route definition
- Url: /api/v1/profile
- Method: PUT
- Request:
ProfileUpdateRequest - Response:
ProfileGetResponse
- request definition
type ProfileUpdateRequest struct {
Nickname string `json:"nickname,optional"`
Email string `json:"email,optional"`
Phone string `json:"phone,optional"`
Avatar string `json:"avatar,optional"`
}
- response definition
type ProfileGetResponse struct {
Id int64 `json:"id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Email string `json:"email"`
Phone string `json:"phone"`
Roles []string `json:"roles"`
Avatar string `json:"avatar"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type ProfileInfo struct {
Id int64 `json:"id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Email string `json:"email"`
Phone string `json:"phone"`
Roles []string `json:"roles"`
Avatar string `json:"avatar"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
- route definition
- Url: /api/v1/profile/games
- Method: GET
- Request:
ProfileGamesRequest - Response:
ProfileGamesResponse
- request definition
type ProfileGamesRequest struct {
}
- response definition
type ProfileGamesResponse struct {
Games []ProfileGame `json:"games"`
}
- route definition
- Url: /api/v1/profile/password
- Method: PUT
- Request:
ProfilePasswordRequest - Response:
-
- request definition
type ProfilePasswordRequest struct {
OldPassword string `json:"oldPassword"`
NewPassword string `json:"newPassword"`
}
- response definition
- route definition
- Url: /api/v1/profile/permissions
- Method: GET
- Request:
ProfilePermissionsRequest - Response:
ProfilePermissionsResponse
- request definition
type ProfilePermissionsRequest struct {
GameId string `form:"gameId,optional"`
Env string `form:"env,optional"`
}
- response definition
type ProfilePermissionsResponse struct {
Permissions []ProfilePermission `json:"permissions"`
Admin bool `json:"admin"`
Roles []string `json:"roles"`
PermissionIDs []string `json:"permissionIDs,omitempty"`
}