Add PreUp, PostUp, PreDown, PostDown for client (#1714)
* Fix create client popup background is not white * Fix no Add button when client Allowed Ips or Server Allowed Ips is empty * Add preUp preDown postUp postDown for client * Add description of hooks for client config * Move hooks's label text into 'hooks' in en.json --------- Co-authored-by: yanghuanglin <yanghuanglin@qq.com> Co-authored-by: Bernd Storath <999999bst@gmail.com>
This commit is contained in:
@@ -6,13 +6,11 @@ export type HooksType = InferSelectModel<typeof hooks>;
|
||||
|
||||
export type HooksUpdateType = Omit<HooksType, 'id' | 'createdAt' | 'updatedAt'>;
|
||||
|
||||
const hook = z.string({ message: t('zod.hook') }).pipe(safeStringRefine);
|
||||
|
||||
export const HooksUpdateSchema = schemaForType<HooksUpdateType>()(
|
||||
z.object({
|
||||
preUp: hook,
|
||||
postUp: hook,
|
||||
preDown: hook,
|
||||
postDown: hook,
|
||||
preUp: HookSchema,
|
||||
postUp: HookSchema,
|
||||
preDown: HookSchema,
|
||||
postDown: HookSchema,
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user