feat: utitlize lean queries, remove migration script, index createdAt timestamps (#698)

* feat(mongoDb): utitlize lean queries and index createdAt timestamps for cosmosDB support

* fix: remove unnecessary lean() method from deleteMany calls

* fix: remove unnecessary lean() method from deleteMany calls

* fix: remove lean() from queries that need hydration

* chore(migrateDb.js): remove unused migration script
fix(Preset.js): return lean documents when retrieving presets
refactor(index.js): remove migration script from server initialization
refactor(convos.js): remove toObject() when sending conversation object
refactor(presets.js): remove toObject() when sending presets object
This commit is contained in:
Danny Avila 2023-07-25 19:27:55 -04:00 committed by GitHub
parent 2f7658e39f
commit 19af2b06ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 34 additions and 160 deletions

View file

@ -14,7 +14,7 @@ router.get('/:conversationId', requireJwtAuth, async (req, res) => {
const convo = await getConvo(req.user.id, conversationId);
if (convo) {
res.status(200).send(convo.toObject());
res.status(200).send(convo);
} else {
res.status(404).end();
}