chore: 修改角色删除的限制条件和提示信息

This commit is contained in:
xiaojunnuo
2026-10-22 15:17:49 +08:00
parent 29201d1cf3
commit 32f65bce9f
@@ -62,8 +62,8 @@ export class RoleController extends CrudController<RoleService> {
@Query("id")
id: number
) {
if (id === 1) {
throw new Error("不能删除默认的管理员角色");
if (id <= 3) {
throw new Error("不能删除系统默认角色");
}
const res = await super.delete(id);
await this.auditLog({