feat(journal): add EmbedRegistry, YAML boot config, and pair-aware sanitizer

This commit is contained in:
Jakub Zych
2026-11-28 12:40:33 +01:00
parent 6378d5e815
commit 55ac26e0d3
10 changed files with 603 additions and 118 deletions

View File

@@ -285,7 +285,7 @@ func Store(app *backpack.App) http.HandlerFunc {
writeAPIError(w, http.StatusBadRequest, errValidationFailed)
return
}
post, verrs := buildNewPost(r, db.WithContext(r.Context()), pr, body)
post, verrs := buildNewPost(r, db.WithContext(r.Context()), app, pr, body)
if verrs != nil {
writeValidation(w, verrs)
return
@@ -305,7 +305,7 @@ func Store(app *backpack.App) http.HandlerFunc {
if err := tx.Create(post).Error; err != nil {
return err
}
tags, err := applyPostAssocs(ctx, tx, post, body, h1)
tags, err := applyPostAssocs(ctx, tx, app, post, body, h1)
if err != nil {
return err
}
@@ -362,7 +362,7 @@ func Update(app *backpack.App) http.HandlerFunc {
// D-92/D-102: the values before the write, for the RecordSaved
// subscribers hear (a slug changed over MCP gets its redirect).
before := snapshotPost(r.Context(), db.WithContext(r.Context()), post, body)
if verrs := applyPostUpdate(r, db.WithContext(r.Context()), post, body); verrs != nil {
if verrs := applyPostUpdate(r, db.WithContext(r.Context()), app, post, body); verrs != nil {
writeValidation(w, verrs)
return
}
@@ -383,7 +383,7 @@ func Update(app *backpack.App) http.HandlerFunc {
if err := tx.Save(post).Error; err != nil {
return err
}
tags, err := applyPostAssocs(ctx, tx, post, body, h1)
tags, err := applyPostAssocs(ctx, tx, app, post, body, h1)
if err != nil {
return err
}