mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-09 13:27:57 +01:00
added Response.Committed checks
This commit is contained in:
1 parent
b2284b5f4b
commit
610a948dcc
11 files changed
+157
-60
No files matched your search
@@ -85,6 +85,10 @@ func RecordAuthResponse(
|
||||
event.Meta = meta
|
||||
|
||||
return app.OnRecordAuthRequest().Trigger(event, func(e *core.RecordAuthEvent) error {
|
||||
if e.HttpContext.Response().Committed {
|
||||
return nil
|
||||
}
|
||||
|
||||
// allow always returning the email address of the authenticated account
|
||||
e.Record.IgnoreEmailVisibility(true)
|
||||
|
||||
|
||||
Reference in new issue
Block a user