Updated createOrUpdateUser function in auth.js to return the expanded object IDs from the new user document directly, ensuring accurate data representation upon user creation or update.
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
This commit is contained in:
parent
5e71afe246
commit
4db7ffff6a
@ -295,7 +295,7 @@ const createOrUpdateUser = async (userInfo) => {
|
||||
lastName,
|
||||
});
|
||||
await newUser.save();
|
||||
return expandObjectIds(newUser);
|
||||
return expandObjectIds(newUser._doc);
|
||||
} catch (error) {
|
||||
logger.error('Error creating/updating user:', error);
|
||||
throw error;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user