Skip to content

onAfterForceDelete()

This hook/event is called the after deleting a record.

It can be used in the FORCE_DELETE handler.

ts
import { IAfterForceDeleteContext } from "axe-api";

export default async (parameters: IAfterForceDeleteContext) => {
  // do something in here
};

IAfterForceDeleteContext

The following parameters can be used in the hook/event function;

ParameterDescription
reqAxeRequest
resAxeResponse
modelCurrent model instance. For example; User
databaseDatabase connection instance. For example Knex.js
relationThe relation definition if the route is a related route (For example api/v1/users/:userId/posts).
parentModelThe parent model instance if the route is a related route (For example api/v1/users/:userId/posts).
itemThe current record.

Released under the MIT License.