mirror of
https://github.com/hexastack/hexabot
synced 2025-02-22 20:38:32 +00:00
fix: appropriate toast message on category bulk delete
This commit is contained in:
parent
63efaf3193
commit
a1dd6f5ee5
@ -54,7 +54,11 @@ export class CategoryRepository extends BaseRepository<
|
|||||||
criteria: TFilterQuery<Category>,
|
criteria: TFilterQuery<Category>,
|
||||||
) {
|
) {
|
||||||
criteria = query.getQuery();
|
criteria = query.getQuery();
|
||||||
const ids = Array.isArray(criteria._id) ? criteria._id : [criteria._id];
|
const ids = Array.isArray(criteria._id?.$in)
|
||||||
|
? criteria._id.$in
|
||||||
|
: Array.isArray(criteria._id)
|
||||||
|
? criteria._id
|
||||||
|
: [criteria._id];
|
||||||
|
|
||||||
for (const id of ids) {
|
for (const id of ids) {
|
||||||
const associatedBlocks = await this.blockService.findOne({
|
const associatedBlocks = await this.blockService.findOne({
|
||||||
|
Loading…
Reference in New Issue
Block a user