mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
Merge remote-tracking branch 'origin/main' into feat-refactor-0.1.1
This commit is contained in:
commit
5467d550e5
4 changed files with 28 additions and 7 deletions
|
|
@ -20,11 +20,17 @@ router.get('/:conversationId', async (req, res) => {
|
|||
|
||||
router.post('/clear', async (req, res) => {
|
||||
let filter = {};
|
||||
const { conversationId } = req.body.arg;
|
||||
const { conversationId, source } = req.body.arg;
|
||||
if (conversationId) {
|
||||
filter = { conversationId };
|
||||
}
|
||||
|
||||
console.log('source:', source);
|
||||
|
||||
if (source === 'button' && !conversationId) {
|
||||
return res.status(200).send('No conversationId provided');
|
||||
}
|
||||
|
||||
try {
|
||||
const dbResponse = await deleteConvos(req?.session?.user?.username, filter);
|
||||
res.status(201).send(dbResponse);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue