MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / updateDigestContent

Function updateDigestContent

server/src/db/digest-db.ts:364–376  ·  view source on GitHub ↗
(
  id: number,
  content: DigestContent,
)

Source from the content-addressed store, hash-verified

362 * Update the content of a draft digest. Only works on drafts.
363 */
364export async function updateDigestContent(
365 id: number,
366 content: DigestContent,
367): Promise<DigestRecord | null> {
368 const result = await query<DigestRecord>(
369 `UPDATE weekly_digests
370 SET content = $2
371 WHERE id = $1 AND status = 'draft'
372 RETURNING ${DIGEST_COLUMNS}`,
373 [id, JSON.stringify(content)],
374 );
375 return result.rows[0] || null;
376}
377
378/**
379 * Find a digest by its Slack review message

Callers 3

updateContentFunction · 0.85
handleDigestEditReplyFunction · 0.85
generateDraftFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected