@ -60,7 +60,7 @@ async function edit(ctx) {
const role = await models.Role.findOne({
where: { name: name, id: { $not: id }, delete: false }
})
if (!role) {
if (role) {
throw '当前角色已存在'
}
let storageData = { name }