fix more stuff

This commit is contained in:
2026-08-24 22:51:07 +02:00
parent 456962fe18
commit 581f5444fb
10 changed files with 226 additions and 206 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ func (s *Service) Login(ctx context.Context, email, password string) (User, erro
return user.User, nil
}
func (s *Service) UpdateProfile(ctx context.Context, userID uuid.UUID, email, name string) (User, error) {
func (s *Service) UpdateProfile(ctx context.Context, userID uuid.UUID, email, name, studioName, tagline, websiteURL, instagramURL string) (User, error) {
email = strings.ToLower(strings.TrimSpace(email))
name = strings.TrimSpace(name)
if !strings.Contains(email, "@") || len(email) > 254 {
@@ -89,7 +89,7 @@ func (s *Service) UpdateProfile(ctx context.Context, userID uuid.UUID, email, na
if name == "" || len(name) > 120 {
return User{}, fmt.Errorf("name is required")
}
return s.repository.UpdateUser(ctx, userID, email, name)
return s.repository.UpdateUser(ctx, userID, email, name, studioName, tagline, websiteURL, instagramURL)
}
func (s *Service) ChangePassword(ctx context.Context, userID uuid.UUID, currentPassword, newPassword string) error {