mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 19:34:34 +00:00
chore: quick fix
This commit is contained in:
@@ -238,11 +238,13 @@ const createUser = async (data: UserPayload): Promise<UserDetailsResponse> => {
|
|||||||
const savedUser = await user.save()
|
const savedUser = await user.save()
|
||||||
|
|
||||||
const groupController = new GroupController()
|
const groupController = new GroupController()
|
||||||
const allUsersGroup = await groupController.getGroupByGroupName(
|
const allUsersGroup = await groupController
|
||||||
ALL_USERS_GROUP.name
|
.getGroupByGroupName(ALL_USERS_GROUP.name)
|
||||||
)
|
.catch(() => {})
|
||||||
|
|
||||||
await groupController.addUserToGroup(allUsersGroup.groupId, savedUser.id)
|
if (allUsersGroup) {
|
||||||
|
await groupController.addUserToGroup(allUsersGroup.groupId, savedUser.id)
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: savedUser.id,
|
id: savedUser.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user