fix: remove soft delete from the blog category
This commit is contained in:
@@ -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" },
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user