mirror of
https://github.com/hexastack/hexabot
synced 2025-06-04 03:26:22 +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.
|
||||
* @param ids - IDs of categories to be deleted.
|
||||
* Deletes multiple context variables by their IDs.
|
||||
* @param ids - IDs of context variables to be deleted.
|
||||
* @returns A Promise that resolves to the deletion result.
|
||||
*/
|
||||
@CsrfCheck(true)
|
||||
|
@ -65,9 +65,11 @@ export class ContextVarRepository extends BaseRepository<ContextVar> {
|
||||
});
|
||||
|
||||
if (associatedBlocks?.length > 0) {
|
||||
const blockIds = associatedBlocks.map((block) => block.id).join(', ');
|
||||
const blockNames = associatedBlocks
|
||||
.map((block) => block.name)
|
||||
.join(', ');
|
||||
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