mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-24 15:00:25 +02:00
added support for optional Model and Record event hook tags
This commit is contained in:
1 parent
32af49dbec
commit
b8d7609e9e
20 files changed
+748
-559
No files matched your search
+3
-4
@@ -71,10 +71,9 @@ func InitApi(app core.App) (*echo.Echo, error) {
|
||||
apiErr = NewBadRequestError("", err)
|
||||
}
|
||||
|
||||
event := &core.ApiErrorEvent{
|
||||
HttpContext: c,
|
||||
Error: apiErr,
|
||||
}
|
||||
event := new(core.ApiErrorEvent)
|
||||
event.HttpContext = c
|
||||
event.Error = apiErr
|
||||
|
||||
// send error response
|
||||
hookErr := app.OnBeforeApiError().Trigger(event, func(e *core.ApiErrorEvent) error {
|
||||
|
||||
Reference in new issue
Block a user