immich/server/libs/domain/src/api-key/response-dto/api-key-response.dto.ts
Zack Pollard 000d0a08f4
infra(server): fix Album TypeORM relations and change ids to uuids (#1582)
* infra: make api-key primary key column a UUID

* infra: move ManyToMany relations in album entity, make ownerId ManyToOne

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2023-02-18 14:58:55 -06:00

18 lines
360 B
TypeScript

import { APIKeyEntity } from '@app/infra/db/entities';
export class APIKeyResponseDto {
id!: string;
name!: string;
createdAt!: string;
updatedAt!: string;
}
export function mapKey(entity: APIKeyEntity): APIKeyResponseDto {
return {
id: entity.id,
name: entity.name,
createdAt: entity.createdAt,
updatedAt: entity.updatedAt,
};
}