mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: toast output message
This commit is contained in:
parent
bbba54b2c1
commit
8fdc3c6d1b
@ -147,8 +147,8 @@ export class ContextVarController extends BaseController<ContextVar> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes multiple categories by their IDs.
|
* Deletes multiple context variables by their IDs.
|
||||||
* @param ids - IDs of categories to be deleted.
|
* @param ids - IDs of context variables to be deleted.
|
||||||
* @returns A Promise that resolves to the deletion result.
|
* @returns A Promise that resolves to the deletion result.
|
||||||
*/
|
*/
|
||||||
@CsrfCheck(true)
|
@CsrfCheck(true)
|
||||||
|
@ -65,9 +65,11 @@ export class ContextVarRepository extends BaseRepository<ContextVar> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (associatedBlocks?.length > 0) {
|
if (associatedBlocks?.length > 0) {
|
||||||
const blockIds = associatedBlocks.map((block) => block.id).join(', ');
|
const blockNames = associatedBlocks
|
||||||
|
.map((block) => block.name)
|
||||||
|
.join(', ');
|
||||||
throw new ForbiddenException(
|
throw new ForbiddenException(
|
||||||
`Context var "${contextVar.name}" is associated with the following block(s): ${blockIds} and cannot be deleted.`,
|
`Context var "${contextVar.name}" is associated with the following block(s): ${blockNames} and cannot be deleted.`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user