fix: linter
Deploy banu-front / deploy (push) Successful in 1m28s

This commit is contained in:
sajjadtalkhabi
2026-05-28 15:52:48 +03:30
parent 3f3c66a02d
commit 9660e3fe8f
41 changed files with 1669 additions and 1087 deletions
+5 -7
View File
@@ -134,14 +134,12 @@ register('PATCH', endpoints.updateUserRole, ({ params, data }) => {
const nextRoleNames = Array.isArray(data.roles)
? data.roles.filter(Boolean)
: data.role
? [data.role]
: data.roleId
? [roles.find((r) => r.id === Number(data.roleId))?.name].filter(Boolean)
: []
? [data.role]
: data.roleId
? [roles.find((r) => r.id === Number(data.roleId))?.name].filter(Boolean)
: []
const primary = nextRoleNames[0] ? byName(nextRoleNames[0]) : null
const patch = nextRoleNames.length
? { roles: nextRoleNames, roleId: primary?.id }
: {}
const patch = nextRoleNames.length > 0 ? { roles: nextRoleNames, roleId: primary?.id } : {}
const updated = updateById(adminUsers, params.id, patch)
return {
success: true,