Interface.ResourceHook

12003

resourceHook

Pre-execute and post-execute service methods before or after operations on the resource table resourceData, allowing execution of Service before or after database operations.

Reference Use Case

{ "before": [{ "service": "service file name", "serviceFunction": "service method name" }], "after": [{ "service": "service file name", "serviceFunction": "service method name" }] }
  • before: Before the sql execution, the framework middleware httpResourceHook.js will read and run the service method.
  • after: After the sql execution, the framework middleware httpResourceHook.js will read and run the service method.