You've already forked pocketbase
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user