summaries chat client
This commit is contained in:
@@ -176,6 +176,13 @@ async function updateSummary(id, { content, tokenCount, episodeRange }) {
|
||||
return res.json();
|
||||
}
|
||||
|
||||
async function getSummariesByProject(projectId) {
|
||||
const res = await fetch(`${BASE_URL}/projects/${projectId}/summaries`);
|
||||
if (!res.ok) throw new Error(`Failed to fetch summaries: ${res.status}`);
|
||||
return res.json();
|
||||
}
|
||||
// add to module.exports too
|
||||
|
||||
module.exports = {
|
||||
getSessionByExternalId,
|
||||
createSession,
|
||||
@@ -197,4 +204,5 @@ module.exports = {
|
||||
getSummariesBySession,
|
||||
createSummary,
|
||||
updateSummary,
|
||||
getSummariesByProject,
|
||||
}
|
||||
Reference in New Issue
Block a user