Syntax changes in front and back end dirs. These do not affect functionality and are purely intended to better capture and describe the app's functionality and purpose

This commit is contained in:
KS Jannette
2026-08-03 00:07:58 -04:00
parent 4a5e5d6612
commit 0352bdf516
42 changed files with 812 additions and 812 deletions

View File

@@ -4,15 +4,15 @@ import { handleResponse } from './client.js';
const BASE = '/api/sources';
export async function listSources(notebookId) {
const res = await fetch(`${BASE}?notebookId=${notebookId}`);
export async function listSources(sourceCorpusId) {
const res = await fetch(`${BASE}?sourceCorpusId=${sourceCorpusId}`);
return handleResponse(res);
}
export async function uploadSource(notebookId, file) {
export async function uploadSource(sourceCorpusId, file) {
const formData = new FormData();
formData.append('file', file);
formData.append('notebookId', notebookId);
formData.append('sourceCorpusId', sourceCorpusId);
const res = await fetch(BASE, {
method: 'POST',
body: formData,
@@ -20,11 +20,11 @@ export async function uploadSource(notebookId, file) {
return handleResponse(res);
}
export async function addUrlSource(notebookId, url) {
export async function addUrlSource(sourceCorpusId, url) {
const res = await fetch(`${BASE}/url`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ notebookId, url }),
body: JSON.stringify({ sourceCorpusId, url }),
});
return handleResponse(res);
}