fix: toast output message

This commit is contained in:
hexastack 2024-10-09 10:17:35 +01:00
parent bbba54b2c1
commit 8fdc3c6d1b
2 changed files with 6 additions and 4 deletions

View File

@ -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)

View File

@ -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.`,
); );
} }
} }