added being able to assign sessions to projects via the sessions modal
This commit is contained in:
@@ -30,11 +30,11 @@ router.get('/', async (req, res) => {
|
||||
})
|
||||
|
||||
router.patch('/:sessionId', async (req, res) => {
|
||||
const { name } = req.body;
|
||||
const { name, projectId } = req.body;
|
||||
if (!name?.trim()) return res.status(400).json({ error: 'name is required' });
|
||||
|
||||
try {
|
||||
const session = await memory.updateSession(req.params.sessionId, { name: name.trim() });
|
||||
const session = await memory.updateSession(req.params.sessionId, { name, projectId });
|
||||
res.json(session);
|
||||
} catch (err) {
|
||||
res.status(500).json({ error: err.message });
|
||||
|
||||
Reference in New Issue
Block a user