feat: implement user profile retrieval with roles and permissions caching
This commit is contained in:
@@ -3,6 +3,25 @@ package responses
|
||||
type BodyRegisterResponse struct {
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
type BodyLoginResponse struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
// RoleItem represents a role assigned to the user in the profile response.
|
||||
type RoleItem struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user