MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / dbReadPageFlags

Function dbReadPageFlags

apps/web/src/bridge/http-bridge.ts:750–762  ·  view source on GitHub ↗
(
  pages?: Record<string, string>
)

Source from the content-addressed store, hash-verified

748}
749
750async function dbReadPageFlags(
751 pages?: Record<string, string>
752): Promise<Record<string, boolean> | undefined> {
753 if (!pages || Object.keys(pages).length === 0) return undefined
754 const flags: Record<string, boolean> = {}
755 await Promise.all(
756 Object.entries(pages).map(async ([rowId, notePath]) => {
757 const text = await readFileTextOrNull(notePath)
758 if (text !== null) flags[rowId] = dbNoteHasBody(text)
759 })
760 )
761 return flags
762}
763
764async function primaryNotesAtRoot(): Promise<boolean> {
765 try {

Callers 1

openDatabaseFunction · 0.85

Calls 2

readFileTextOrNullFunction · 0.85
dbNoteHasBodyFunction · 0.85

Tested by

no test coverage detected