Skip to content

Commit

Permalink
Enable timestamps on ensureProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alianza committed May 30, 2024
1 parent 8e294f4 commit f25a2e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/serverUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ export async function getCombos(model, operation, query = {}, args = []) {
* @param query {object} - Query to find the profile
* @returns {Promise<Profile>} - The profile
*/
export const ensureProfile = async (query) =>
await Profile.findOneAndUpdate(query, {}, { new: true, upsert: true, timestamps: false }).lean();
export const ensureProfile = async (query) => {
await Profile.findOneAndUpdate(query, {}, { new: true, upsert: true, timestamps: true }).lean();
};

/**
* Serialize an object by parsing it to JSON and then back to an object
Expand Down

0 comments on commit f25a2e9

Please sign in to comment.