1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 11:24:35 +00:00

chore: quick fix

This commit is contained in:
2023-02-03 18:39:35 +05:00
parent 7f2174dd2c
commit 5bec453e89

View File

@@ -238,11 +238,13 @@ const createUser = async (data: UserPayload): Promise<UserDetailsResponse> => {
const savedUser = await user.save()
const groupController = new GroupController()
const allUsersGroup = await groupController.getGroupByGroupName(
ALL_USERS_GROUP.name
)
const allUsersGroup = await groupController
.getGroupByGroupName(ALL_USERS_GROUP.name)
.catch(() => {})
await groupController.addUserToGroup(allUsersGroup.groupId, savedUser.id)
if (allUsersGroup) {
await groupController.addUserToGroup(allUsersGroup.groupId, savedUser.id)
}
return {
id: savedUser.id,