setup adminstore in the local handler service
This commit is contained in:
parent
ac0b4b2ed1
commit
12825ae08a
@ -1,6 +1,8 @@
|
|||||||
package handlers
|
package handlers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"git.defalsify.org/vise.git/asm"
|
"git.defalsify.org/vise.git/asm"
|
||||||
"git.defalsify.org/vise.git/db"
|
"git.defalsify.org/vise.git/db"
|
||||||
"git.defalsify.org/vise.git/engine"
|
"git.defalsify.org/vise.git/engine"
|
||||||
@ -34,14 +36,19 @@ type LocalHandlerService struct {
|
|||||||
Rs resource.Resource
|
Rs resource.Resource
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewLocalHandlerService(fp string, debug bool, dbResource *resource.DbResource, cfg engine.Config, rs resource.Resource) (*LocalHandlerService, error) {
|
func NewLocalHandlerService(ctx context.Context, fp string, debug bool, dbResource *resource.DbResource, cfg engine.Config, rs resource.Resource) (*LocalHandlerService, error) {
|
||||||
parser, err := getParser(fp, debug)
|
parser, err := getParser(fp, debug)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
adminstore, err := utils.NewAdminStore(ctx, "admin_numbers")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
return &LocalHandlerService{
|
return &LocalHandlerService{
|
||||||
Parser: parser,
|
Parser: parser,
|
||||||
DbRs: dbResource,
|
DbRs: dbResource,
|
||||||
|
AdminStore: adminstore,
|
||||||
Cfg: cfg,
|
Cfg: cfg,
|
||||||
Rs: rs,
|
Rs: rs,
|
||||||
}, nil
|
}, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user