chatbridge/server/schemas/group.schema.ts
ansible user/allowed to read system logs 22340d8a96 working group controller
2023-07-24 18:40:22 -07:00

21 lines
No EOL
585 B
TypeScript

import { object, string, TypeOf } from 'zod';
export const createGroupSchema = object({
body: object({
name: string({
required_error: "Name for group required"
}),
token: string({
required_error: "Administration token required for creating groups"
})
})
})
export const getGroupSchema = object({
name: string({
required_error: "Name of group required to get group"
})
})
export type CreateGroupInput = TypeOf<typeof createGroupSchema>['body'];
export type GetGroupInput = TypeOf<typeof getGroupSchema>;