mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 22:50:51 +00:00
feat(profile): persist and expose the date-format preference
Accept dateFormat on the profile PATCH field-by-field, echo it from the profile + /me reads, mirror it into the client auth user, and add the field to the OpenAPI request/response schemas.
This commit is contained in:
1 parent
37e539d0bf
commit
86a9ca2e1e
10 files changed
+57
-1
No files matched your search
@@ -42,6 +42,7 @@ export const GET = apiHandler(async () => {
|
||||
locale: true,
|
||||
timezone: true,
|
||||
timeFormat: true,
|
||||
dateFormat: true,
|
||||
moodReminderEnabled: true,
|
||||
fullName: true,
|
||||
insurerName: true,
|
||||
@@ -77,6 +78,7 @@ export const GET = apiHandler(async () => {
|
||||
locale: dbUser?.locale ?? null,
|
||||
timezone: dbUser?.timezone ?? "Europe/Berlin",
|
||||
timeFormat: dbUser?.timeFormat ?? "AUTO",
|
||||
dateFormat: dbUser?.dateFormat ?? "AUTO",
|
||||
moodReminderEnabled: dbUser?.moodReminderEnabled ?? false,
|
||||
fullName: dbUser?.fullName ?? null,
|
||||
insurerName: dbUser?.insurerName ?? null,
|
||||
@@ -114,6 +116,7 @@ export const PATCH = apiHandler(async (request: NextRequest) => {
|
||||
locale: result.user.locale,
|
||||
timezone: result.user.timezone,
|
||||
timeFormat: result.user.timeFormat,
|
||||
dateFormat: result.user.dateFormat,
|
||||
moodReminderEnabled: result.user.moodReminderEnabled,
|
||||
fullName: result.user.fullName,
|
||||
insurerName: result.user.insurerName,
|
||||
|
||||
Reference in new issue
Block a user