From 20ea6c4a2755c07e33c0a9ab857f75676503104f Mon Sep 17 00:00:00 2001 From: Kharec Date: Sat, 10 Jan 2026 22:33:41 +0100 Subject: [PATCH] feat: add RegistrationResponseDTO and AccountDeletionResponseDTO --- internal/dto/user.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/internal/dto/user.go b/internal/dto/user.go index cb15cdd..a786a26 100644 --- a/internal/dto/user.go +++ b/internal/dto/user.go @@ -74,3 +74,19 @@ func ToSanitizedUserDTOs(users []database.User) []SanitizedUserDTO { } return dtos } + +type RegistrationResponseDTO struct { + User UserDTO `json:"user"` + VerificationSent bool `json:"verification_sent"` +} + +func ToRegistrationResponseDTO(user *database.User, verificationSent bool) RegistrationResponseDTO { + return RegistrationResponseDTO{ + User: ToUserDTO(user), + VerificationSent: verificationSent, + } +} + +type AccountDeletionResponseDTO struct { + PostsDeleted bool `json:"posts_deleted"` +}