MCPcopy Create free account
hub / github.com/SamuelZ12/longcut / fetchNotes

Function fetchNotes

lib/notes-client.ts:13–25  ·  view source on GitHub ↗
(params: { youtubeId: string })

Source from the content-addressed store, hash-verified

11}
12
13export async function fetchNotes(params: { youtubeId: string }): Promise<Note[]> {
14 const query = new URLSearchParams();
15 query.set('youtubeId', params.youtubeId);
16
17 const response = await csrfFetch.get(`/api/notes?${query.toString()}`);
18
19 if (!response.ok) {
20 throw new Error('Failed to fetch notes');
21 }
22
23 const data = await response.json();
24 return (data.notes || []) as Note[];
25}
26
27export async function saveNote(payload: SaveNotePayload): Promise<Note> {
28 const response = await csrfFetch.post('/api/notes', payload);

Callers 1

AnalyzePageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected