Saxonberg Server API
    Preparing search index...

    Public shape added by AroundDeleteHookMixin.

    interface AroundDeleteHook {
        aroundDelete(
            collection: string,
            id: string,
            next: (id: string) => Promise<void>,
        ): Promise<void>;
    }
    Index

    Methods

    Methods

    • Parameters

      • collection: string
      • id: string
      • next: (id: string) => Promise<void>

      Returns Promise<void>

      Invoked by PersistenceManager around every delete from the hook's collection, middleware-style. Around — you MUST call next(id) to proceed; validate before (e.g. reject deletes that break an invariant by throwing) or run side-effects after. Default is pass-through.