Compare commits
2 Commits
ef4a05f8a5
...
cbfe0fd54c
| Author | SHA1 | Date | |
|---|---|---|---|
| cbfe0fd54c | |||
| 1727ae4a7c |
@@ -75,6 +75,13 @@ func ToSanitizedUserDTOs(users []database.User) []SanitizedUserDTO {
|
|||||||
return dtos
|
return dtos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SanitizedUserListDTO struct {
|
||||||
|
Users []SanitizedUserDTO `json:"users"`
|
||||||
|
Count int `json:"count"`
|
||||||
|
Limit int `json:"limit"`
|
||||||
|
Offset int `json:"offset"`
|
||||||
|
}
|
||||||
|
|
||||||
type RegistrationResponseDTO struct {
|
type RegistrationResponseDTO struct {
|
||||||
User UserDTO `json:"user"`
|
User UserDTO `json:"user"`
|
||||||
VerificationSent bool `json:"verification_sent"`
|
VerificationSent bool `json:"verification_sent"`
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ func (h *UserHandler) GetUsers(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
userDTOs := dto.ToSanitizedUserDTOs(users)
|
userDTOs := dto.ToSanitizedUserDTOs(users)
|
||||||
responseDTO := dto.UserListDTO{
|
responseDTO := dto.SanitizedUserListDTO{
|
||||||
Users: userDTOs,
|
Users: userDTOs,
|
||||||
Count: len(userDTOs),
|
Count: len(userDTOs),
|
||||||
Limit: limit,
|
Limit: limit,
|
||||||
|
|||||||
Reference in New Issue
Block a user