1
0
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:
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 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,