1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-28 00:38:36 +02:00

[#5614] removed hook.HandlerFunc[T] type

This commit is contained in:
Gani Georgiev
2024-10-07 09:52:31 +03:00
parent 1d4dd5d5b4
commit 393b461ea2
13 changed files with 4236 additions and 4235 deletions

View File

@@ -81,7 +81,7 @@ func RequireAuth(optCollectionNames ...string) *hook.Handler[*core.RequestEvent]
}
}
func requireAuth(optCollectionNames ...string) hook.HandlerFunc[*core.RequestEvent] {
func requireAuth(optCollectionNames ...string) func(*core.RequestEvent) error {
return func(e *core.RequestEvent) error {
if e.Auth == nil {
return e.UnauthorizedError("The request requires valid record authorization token.", nil)