feat: fully implement profile controller;

feat: implement file upload handling in controller with size and type validation;
feat: add custom validation rules for bio and color hex fields;
refactor: enhance request handling with dedicated client info extraction;
chore: update profile DTOs with validation tags;
docs: profile controller swagger
This commit is contained in:
2025-07-19 22:57:44 +03:00
parent fc0c73aa5b
commit f65439fb50
11 changed files with 975 additions and 12 deletions

View File

@@ -31,7 +31,7 @@ type ProfileService interface {
UpdateProfile(cinfo dto.ClientInfo, newProfile dto.ProfileDto) (bool, error)
GetProfileSettings(cinfo dto.ClientInfo) (dto.ProfileSettingsDto, error)
UpdateProfileSettings(cinfo dto.ClientInfo, newProfileSettings dto.ProfileSettingsDto) (bool, error)
UploadAvatar(cinfo dto.ClientInfo, filePath string)
UploadAvatar(cinfo dto.ClientInfo, filePath string) (string, error)
}
type profileServiceImpl struct {
@@ -64,6 +64,6 @@ func (p *profileServiceImpl) UpdateProfileSettings(cinfo dto.ClientInfo, newProf
panic("unimplemented")
}
func (p *profileServiceImpl) UploadAvatar(cinfo dto.ClientInfo, filePath string) {
func (p *profileServiceImpl) UploadAvatar(cinfo dto.ClientInfo, filePath string) (string, error) {
panic("unimplemented")
}

View File

@@ -25,5 +25,6 @@ var Module = fx.Module("services",
fx.Provide(
NewSmtpService,
NewAuthService,
NewProfileService,
),
)