forked from urdt/ussd
attach an admin store for phone numbers
This commit is contained in:
parent
c2068db050
commit
dc418771a7
@ -49,7 +49,7 @@ func main() {
|
|||||||
ctx = context.WithValue(ctx, "Database", database)
|
ctx = context.WithValue(ctx, "Database", database)
|
||||||
pfp := path.Join(scriptDir, "pp.csv")
|
pfp := path.Join(scriptDir, "pp.csv")
|
||||||
|
|
||||||
as := utils.NewAdminStore("admin_numbers.txt")
|
as, _ := utils.NewAdminStore(ctx, "admin_numbers")
|
||||||
as.Seed()
|
as.Seed()
|
||||||
|
|
||||||
cfg := engine.Config{
|
cfg := engine.Config{
|
||||||
@ -94,6 +94,7 @@ func main() {
|
|||||||
|
|
||||||
lhs, err := handlers.NewLocalHandlerService(pfp, true, dbResource, cfg, rs)
|
lhs, err := handlers.NewLocalHandlerService(pfp, true, dbResource, cfg, rs)
|
||||||
lhs.SetDataStore(&userdatastore)
|
lhs.SetDataStore(&userdatastore)
|
||||||
|
lhs.SetAdminStore(as)
|
||||||
lhs.SetPersister(pe)
|
lhs.SetPersister(pe)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user