get sessions by projectId
This commit is contained in:
@@ -44,8 +44,8 @@ app.post('/sessions', (req, res) => {
|
||||
});
|
||||
|
||||
app.get('/sessions', (req, res) => {
|
||||
const {limit = EPISODIC.DEFAULT_PAGE_SIZE, offset = EPISODIC.DEFAULT_OFFSET } = req.query;
|
||||
const sessions = episodic.getSessions(Number(limit), Number(offset));
|
||||
const {limit = EPISODIC.DEFAULT_PAGE_SIZE, offset = EPISODIC.DEFAULT_OFFSET, projectId } = req.query;
|
||||
const sessions = episodic.getSessions(Number(limit), Number(offset, projectId ?? null));
|
||||
res.json(sessions);
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user