88 * generic webhook endpoint for source-specific payloads
99 */
1010
11- import * as sources from "../sources" ;
11+ import * as sources from "../../ sources" ;
1212
1313export function src ( app : any ) {
1414 // list available sources
@@ -61,7 +61,7 @@ export function src(app: any) {
6161 }
6262
6363 try {
64- const { ingest_document } = await import ( "../../ops/ingest" ) ;
64+ const { ingestDocument } = await import ( "../../ops/ingest" ) ;
6565
6666 // handle different github events
6767 let content = "" ;
@@ -85,7 +85,7 @@ export function src(app: any) {
8585 }
8686
8787 if ( content ) {
88- const result = await ingest_document ( "text" , content , meta ) ;
88+ const result = await ingestDocument ( "text" , content , meta ) ;
8989 res . json ( { ok : true , memory_id : result . root_memory_id , event : event_type } ) ;
9090 } else {
9191 res . json ( { ok : true , skipped : true , reason : "no content" } ) ;
@@ -100,9 +100,9 @@ export function src(app: any) {
100100 const payload = req . body ;
101101
102102 try {
103- const { ingest_document } = await import ( "../../ops/ingest" ) ;
103+ const { ingestDocument } = await import ( "../../ops/ingest" ) ;
104104 const content = JSON . stringify ( payload , null , 2 ) ;
105- const result = await ingest_document ( "text" , content , { source : "notion_webhook" } ) ;
105+ const result = await ingestDocument ( "text" , content , { source : "notion_webhook" } ) ;
106106 res . json ( { ok : true , memory_id : result . root_memory_id } ) ;
107107 } catch ( e : any ) {
108108 res . status ( 500 ) . json ( { error : e . message } ) ;
0 commit comments