complete renaming functions, abstracts more svg, sets title to current convo title, adds a try again feature to errors

This commit is contained in:
Daniel Avila 2023-02-11 10:22:15 -05:00
parent 592b7629aa
commit 5af5a97d8f
24 changed files with 512 additions and 82 deletions

View file

@ -44,6 +44,18 @@ module.exports = {
return { message: 'Error saving conversation' };
}
},
updateConvo: async ({ conversationId, ...update }) => {
try {
return await Conversation.findOneAndUpdate(
{ conversationId },
update,
{ new: true }
).exec();
} catch (error) {
console.log(error);
return { message: 'Error updating conversation' };
}
},
getConvos: async () => await Conversation.find({}).exec(),
deleteConvos: async (filter) => {