|
@ -48,11 +48,11 @@ async function editUser (ctx) { |
|
|
// 存在且传递id 或者 不传id也存在
|
|
|
// 存在且传递id 或者 不传id也存在
|
|
|
// 修改 update
|
|
|
// 修改 update
|
|
|
storageData.deleted = false |
|
|
storageData.deleted = false |
|
|
storageData.role = [...new Set([...existUserRes.role, ...role])] |
|
|
storageData.role = role |
|
|
if ( |
|
|
if ( |
|
|
storageData.role.includes('admin') |
|
|
storageData.role.includes('admin') |
|
|
) { |
|
|
) { |
|
|
storageData.disabled = false |
|
|
storageData.disabled = true |
|
|
} |
|
|
} |
|
|
await models.User.update(storageData, { |
|
|
await models.User.update(storageData, { |
|
|
where: { |
|
|
where: { |
|
|