Refactor Protected and Public Routes for Consistent Loading UI; Enhance HomePage with User Company and Branch Details; Update LoginPage Layout; Introduce User Relations in Auth Services
This commit is contained in:
@@ -30,9 +30,7 @@ export const registerService = {
|
||||
// Определить роль для нового пользователя
|
||||
// Только администраторы могут указывать кастомную роль
|
||||
const role =
|
||||
callerRole === "admin" && data.role
|
||||
? data.role
|
||||
: DEFAULT_ROLE_NAME;
|
||||
callerRole === "admin" && data.role ? data.role : DEFAULT_ROLE_NAME;
|
||||
|
||||
// Создать пользователя
|
||||
const newUser = await userService.create({
|
||||
@@ -45,4 +43,3 @@ export const registerService = {
|
||||
return userService.sanitize(newUser);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user