feat(journal): add EmbedRegistry, YAML boot config, and pair-aware sanitizer
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user