generated from Dicken/dickendock
Kritische Bugfixes: Export/CA-Download (Service-Worker), Speichern-Bug bei Diensten/Lesezeichen, Dark-Mode-Direktlink, Favicon-Mixed-Content-Proxy, Live-Update Zuletzt-besucht, Kategorie-Farb-Picker, Startseite-Nav
This commit is contained in:
@@ -46,7 +46,18 @@ export type ServiceCreateInput = z.infer<typeof ServiceCreateSchema>;
|
||||
|
||||
export const ServiceUpdateSchema = ServiceCreateSchema.omit({
|
||||
deviceId: true,
|
||||
}).partial();
|
||||
})
|
||||
.partial()
|
||||
.extend({
|
||||
// Frontend schickt beim Leeren eines Felds bewusst null (nicht nur
|
||||
// "Feld weglassen") - .partial() allein akzeptiert dafür nur
|
||||
// string|undefined, ein PATCH mit category:null schlug daher bisher mit
|
||||
// 400 fehl, ohne dass das Formular das sichtbar gemacht hätte.
|
||||
category: z.string().nullable().optional(),
|
||||
description: z.string().nullable().optional(),
|
||||
icon: z.string().nullable().optional(),
|
||||
favicon: z.string().nullable().optional(),
|
||||
});
|
||||
export type ServiceUpdateInput = z.infer<typeof ServiceUpdateSchema>;
|
||||
|
||||
/** Für Drag & Drop: neue Reihenfolge mehrerer Dienste auf einmal setzen. */
|
||||
@@ -98,7 +109,14 @@ export const BookmarkCreateSchema = z.object({
|
||||
});
|
||||
export type BookmarkCreateInput = z.infer<typeof BookmarkCreateSchema>;
|
||||
|
||||
export const BookmarkUpdateSchema = BookmarkCreateSchema.partial();
|
||||
export const BookmarkUpdateSchema = BookmarkCreateSchema.partial().extend({
|
||||
// Siehe Kommentar bei ServiceUpdateSchema: null muss erlaubt sein, damit
|
||||
// sich Kategorie/Beschreibung/Icons im Bearbeiten-Formular leeren lassen.
|
||||
category: z.string().nullable().optional(),
|
||||
description: z.string().nullable().optional(),
|
||||
icon: z.string().nullable().optional(),
|
||||
favicon: z.string().nullable().optional(),
|
||||
});
|
||||
export type BookmarkUpdateInput = z.infer<typeof BookmarkUpdateSchema>;
|
||||
|
||||
/** Für Drag & Drop: neue Reihenfolge mehrerer Lesezeichen auf einmal setzen. */
|
||||
|
||||
Reference in New Issue
Block a user