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
+2 -2
View File
@@ -61,7 +61,7 @@ const addCamelizeInterceptor = (instance) => {
)
}
const addUnauthorizeInterceptor = (instance) => {
const _addUnauthorizeInterceptor = (instance) => {
instance.interceptors.response.use(
(res) => res,
async (e) => {
@@ -89,7 +89,7 @@ const createInstance = (baseUrl, { headers = {}, ...configs } = {}) => {
addResponseUnwrapInterceptor(instance)
addCamelizeInterceptor(instance)
addSnakizeInterceptor(instance)
// addUnauthorizeInterceptor(instance)
// _addUnauthorizeInterceptor(instance)
return instance
}
+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,
+1 -2
View File
@@ -80,5 +80,4 @@ export const useGetRegisterDataQuery = (options = {}) =>
...options,
})
export const useSaveRegisterDataMutation = () =>
useMutation({ mutationFn: apiSaveRegisterData })
export const useSaveRegisterDataMutation = () => useMutation({ mutationFn: apiSaveRegisterData })