fix: remove soft delete from the blog category

This commit is contained in:
mahyargdz
2025-04-23 14:56:24 +03:30
parent c2949ba06a
commit 0b04ba051a
6 changed files with 15 additions and 13 deletions
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { InjectRepository } from "@nestjs/typeorm";
import { IsNull, Repository } from "typeorm";
import { Repository } from "typeorm";
import { CategoryListSearchQueryDto } from "../../danak-services/DTO/category-search-query.dto";
import { PaginationUtils } from "../../utils/providers/pagination.utils";
@@ -15,13 +15,13 @@ export class BlogCategoriesRepository extends Repository<BlogCategory> {
async findOneById(id: string): Promise<BlogCategory | null> {
return this.findOne({
where: { id, deletedAt: IsNull() },
where: { id },
});
}
async getCategoriesUserSide() {
return this.find({
where: { isActive: true, deletedAt: IsNull() },
where: { isActive: true },
order: { createdAt: "DESC" },
});
}