mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
fix: chatgptBrowser handling and ask.js refactor
This commit is contained in:
parent
005d8fb178
commit
0d7300be9b
4 changed files with 39 additions and 92 deletions
|
|
@ -43,9 +43,15 @@ module.exports = {
|
|||
return { message: 'Error saving conversation' };
|
||||
}
|
||||
},
|
||||
updateConvo: async (user, { conversationId, ...update }) => {
|
||||
updateConvo: async (user, { conversationId, oldConvoId, ...update }) => {
|
||||
try {
|
||||
return await Conversation.findOneAndUpdate({ conversationId: conversationId, user }, update, {
|
||||
let convoId = conversationId;
|
||||
if (oldConvoId) {
|
||||
convoId = oldConvoId;
|
||||
update.conversationId = conversationId;
|
||||
}
|
||||
|
||||
return await Conversation.findOneAndUpdate({ conversationId: convoId, user }, update, {
|
||||
new: true
|
||||
}).exec();
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue