feat(19.3-04): pact.ReorderAfterSave hook inside cabana's reorder transaction
- optional ReorderAfterSave(ctx, partition) runs after the new order is written; an error rolls the reorder back through lifecycleFailure - reorderPost runs in lagoon.Transaction so lagoon.AfterCommit work a hook registers (a site-cache purge) runs only after the commit - pact and cabana READMEs, admin hook table, tree reorder docs
This commit is contained in:
@@ -765,6 +765,15 @@ type FormAfterDelete interface {
|
||||
FormAfterDelete(ctx context.Context, model any) error
|
||||
}
|
||||
|
||||
// ReorderAfterSave optionally runs after a reorder save (POST .../reorder of
|
||||
// a tree or sortable list) wrote the new order, inside the same transaction,
|
||||
// so cabana.TxFromContext returns it and lagoon.AfterCommit work waits for
|
||||
// the commit. partition is the reorder request's partition (nil when the
|
||||
// list has none). A returned error rolls the reorder back.
|
||||
type ReorderAfterSave interface {
|
||||
ReorderAfterSave(ctx context.Context, partition *uint64) error
|
||||
}
|
||||
|
||||
// FormVirtualFields optionally names fields of the controller's form that are
|
||||
// not model columns for the purpose of the form, such as a password and its
|
||||
// confirmation or a "send an invitation" checkbox. The admin framework never
|
||||
|
||||
Reference in New Issue
Block a user