/
dimamir
/
undb
Обзор
Документация
Войти
/
dimamir
/
undb
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/commands/src/create-api-token.command.ts
18 строк
589 B
nichenqin
wip: add space id to resources
05 авг 2024, 07:20
05 авг 2024, 07:20
5379827
Код
Авторство
О чём код?
import { Command, type CommandProps } from "@undb/domain" import { createApiTokenDTO } from "@undb/openapi" import { z } from "@undb/zod" export const createApiTokenCommand = createApiTokenDTO.omit({ spaceId: true }) export type ICreateApiTokenCommand = z.infer<typeof createApiTokenCommand> export class CreateApiTokenCommand extends Command implements ICreateApiTokenCommand { public readonly userId: string public readonly name: string constructor(props: CommandProps<ICreateApiTokenCommand>) { super(props) this.userId = props.userId this.name = props.name } }