mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 17:00:54 +01:00
* wip: add apps crud * wip: add edit for apps * feat: add apps crud * fix: color of icon for no app results wrong * ci: fix lint issues * test: add unit tests for app crud * ci: fix format issue * fix: missing rename in edit form * fix: missing callback deepsource issues
19 lines
434 B
TypeScript
19 lines
434 B
TypeScript
import { z } from "zod";
|
|
|
|
const manageAppSchema = z.object({
|
|
name: z.string().min(1).max(64),
|
|
description: z.string().max(512).nullable(),
|
|
iconUrl: z.string().min(1),
|
|
href: z.string().nullable(),
|
|
});
|
|
|
|
const editAppSchema = manageAppSchema.and(z.object({ id: z.string() }));
|
|
|
|
const byIdSchema = z.object({ id: z.string() });
|
|
|
|
export const appSchemas = {
|
|
manage: manageAppSchema,
|
|
edit: editAppSchema,
|
|
byId: byIdSchema,
|
|
};
|