mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-15 16:28:06 +01:00
added default hook handler arg name and router search helper
This commit is contained in:
1 parent
3e0869a30b
commit
ff3f4332ce
4 files changed
+12
-2
No files matched your search
+1
-1
@@ -108,7 +108,7 @@ func (h *Hook[T]) Bind(handler *Handler[T]) string {
|
||||
// The registered handler is added with a default 0 priority and the id will be autogenerated.
|
||||
//
|
||||
// If you want to register a handler with custom priority or id use the [Hook.Bind] method.
|
||||
func (h *Hook[T]) BindFunc(fn func(T) error) string {
|
||||
func (h *Hook[T]) BindFunc(fn func(e T) error) string {
|
||||
return h.Bind(&Handler[T]{Func: fn})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user