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
+7 -3
View File
@@ -36,8 +36,12 @@ type credentialsRequest struct {
}
type profileRequest struct {
Email string `json:"email"`
Name string `json:"name"`
Email string `json:"email"`
Name string `json:"name"`
StudioName string `json:"studioName"`
Tagline string `json:"tagline"`
WebsiteURL string `json:"websiteUrl"`
InstagramURL string `json:"instagramUrl"`
}
type passwordRequest struct {
@@ -151,7 +155,7 @@ func (h *Handler) UpdateMe(c *gin.Context) {
if !decodeJSON(c, &request) {
return
}
updated, err := h.service.UpdateProfile(c.Request.Context(), user.ID, request.Email, request.Name)
updated, err := h.service.UpdateProfile(c.Request.Context(), user.ID, request.Email, request.Name, request.StudioName, request.Tagline, request.WebsiteURL, request.InstagramURL)
if err != nil {
if errors.Is(err, ErrEmailTaken) {
writeJSON(c, http.StatusConflict, map[string]string{"error": "email is already registered"})