diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index d0cd03df..62083d46 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -39,21 +39,6 @@ "migration": "Restore the backup" }, "zod": { - "stringMalformed": "String is malformed", - "id": "Client ID must be a valid UUID", - "file": "File must be a valid string", - "otl": "oneTimeLink must be a valid string", - "otlMin": "oneTimeLink must be at least 1 Character", - "features": "key must be a valid string", - "ftBool": "enabled must be a valid boolean", - "ftObj": "value must be a valid object", - "ftObj2": "features must be a valid record", - "stat": "statistics must be a valid object", - "statBool": "enabled must be a valid boolean", - "statNumber": "chartType must be a valid number", - "body": "Body must be a valid object", - "device": "Device must be a valid string", - "deviceMin": "Device must be at least 1 Character", "client": { "id": "Client ID must be a valid number", "name": "Name must be a valid string", @@ -87,8 +72,16 @@ }, "interface": { "cidr": "CIDR must be a valid string", - "cidrMin": "CIDR must be at least 1 Character" + "cidrMin": "CIDR must be at least 1 Character", + "device": "Device must be a valid string", + "deviceMin": "Device must be at least 1 Character" + }, + "otl": { + "otl": "oneTimeLink must be a valid string", + "otlMin": "oneTimeLink must be at least 1 Character" }, + "stringMalformed": "String is malformed", + "body": "Body must be a valid object", "hook": "Hook must be a valid string", "mtu": "MTU must be a valid number", "mtuMin": "MTU must be at least 1280", diff --git a/src/server/database/repositories/interface/types.ts b/src/server/database/repositories/interface/types.ts index a003cc62..df271333 100644 --- a/src/server/database/repositories/interface/types.ts +++ b/src/server/database/repositories/interface/types.ts @@ -15,8 +15,8 @@ export type InterfaceUpdateType = Omit< >; const device = z - .string({ message: 'zod.device' }) - .min(1, 'zod.deviceMin') + .string({ message: 'zod.interface.device' }) + .min(1, 'zod.interface.deviceMin') .pipe(safeStringRefine); const cidr = z diff --git a/src/server/database/repositories/oneTimeLink/types.ts b/src/server/database/repositories/oneTimeLink/types.ts index 0114deea..a2a34968 100644 --- a/src/server/database/repositories/oneTimeLink/types.ts +++ b/src/server/database/repositories/oneTimeLink/types.ts @@ -5,8 +5,8 @@ import { z } from 'zod'; export type OneTimeLinkType = InferSelectModel; const oneTimeLinkType = z - .string({ message: 'zod.otl' }) - .min(1, 'zod.otlMin') + .string({ message: 'zod.otl.otl' }) + .min(1, 'zod.otl.otlMin') .pipe(safeStringRefine); export const OneTimeLinkGetSchema = z.object(