This commit is contained in:
2025-11-15 09:14:32 +03:30
parent 53ef6220c1
commit 84163f6c8c
7 changed files with 25 additions and 22 deletions
@@ -15,12 +15,12 @@ export class CategoryService {
) {}
async create(dto: CreateCategoryDto): Promise<Category> {
const data = {
const data: RequiredEntityData<Category> = {
title: dto.title,
isActive: dto.isActive ?? true,
restId: dto.restId,
avatarUrl: dto.avatarUrl,
} as RequiredEntityData<Category>;
};
const category = this.categoryRepository.create(data);
await this.em.persistAndFlush(category);