feat: refactor profile response structure to include UserInfoResponse

This commit is contained in:
Tran Anh Tuan
2026-05-13 15:37:04 +07:00
parent 902caa222f
commit d2bb7aa3aa
2 changed files with 18 additions and 12 deletions

View File

@@ -15,13 +15,17 @@ type RoleItem struct {
Description string `json:"description"`
}
type UserInfoResponse struct {
ID string `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
FullName string `json:"fullName"`
IsActive bool `json:"isActive"`
}
// BodyProfileResponse is the response body for GET /profile.
type BodyProfileResponse struct {
ID string `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
FullName string `json:"fullName"`
IsActive bool `json:"isActive"`
Roles []RoleItem `json:"roles"`
Permissions []string `json:"permissions"`
Info UserInfoResponse `json:"info"`
Roles []RoleItem `json:"roles"`
Permissions []string `json:"permissions"`
}