feat(API): optional display name on users

This commit is contained in:
fsylvain committed 2026-09-29 06:52:58 +02:00
1 parent 792aba433d
commit 7aae704d0a
22 files changed
+1051 -40

No files matched your search

+3 -2
View File
@@ -4,6 +4,7 @@ import (
"RenewCMS/api/handlers/auth"
"RenewCMS/api/middleware"
"RenewCMS/api/pkg/apperr"
"RenewCMS/api/pkg/publicuser"
validator "RenewCMS/api/pkg/validator"
"RenewCMS/internal/domain/user"
"RenewCMS/internal/infrastructure/useCases"
@@ -81,7 +82,7 @@ func TestGetCurrentUserHttp(t *testing.T) {
if got := rec.Header().Get("Cache-Control"); got != "no-store" {
t.Errorf("expected Cache-Control no-store, got %q", got)
}
var body auth.PublicUser
var body publicuser.PublicUser
if err := json.Unmarshal(rec.Body.Bytes(), &body); err != nil {
t.Fatalf("failed to unmarshal body: %v", err)
}
@@ -111,7 +112,7 @@ func TestGetCurrentUserHttp(t *testing.T) {
if got := rec.Header().Get("Cache-Control"); got != "no-store" {
t.Errorf("expected Cache-Control no-store, got %q", got)
}
var body auth.PublicUser
var body publicuser.PublicUser
if err := json.Unmarshal(rec.Body.Bytes(), &body); err != nil {
t.Fatalf("failed to unmarshal body: %v", err)
}