MCPcopy Create free account
hub / github.com/AlexErrant/Pentive / remotifyNote

Function remotifyNote

app/src/sqlite/note.ts:473–490  ·  view source on GitHub ↗
(
	note: T,
)

Source from the content-addressed store, hash-verified

471}
472
473async function remotifyNote<T extends CreateRemoteNote | EditRemoteNote>(
474 note: T,
475) {
476 const fieldValues: Record<string, string> = {} satisfies T['fieldValues']
477 const { docs, hashByLocal } = await remotifyDoms(objValues(note.fieldValues))
478 let i = 0
479 for (const field of objKeys(note.fieldValues)) {
480 fieldValues[field] = docs[i]!.body.innerHTML
481 i++
482 }
483 return {
484 note: {
485 ...note,
486 fieldValues,
487 },
488 hashByLocal,
489 }
490}

Callers 3

getNewNotesToUploadFunction · 0.85
getEditedNotesToUploadFunction · 0.85
makeNoteUploadableFunction · 0.85

Calls 1

remotifyDomsFunction · 0.90

Tested by

no test coverage detected