Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Dec 30, 2023
1 parent e022224 commit c13f7ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion provisioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ import (
"sync"
"time"

"github.com/beeper/libserv/pkg/requestlog"

Check failure on line 33 in provisioning.go

View workflow job for this annotation

GitHub Actions / test (1.20)

no required module provides package github.com/beeper/libserv/pkg/requestlog; to add it:

Check failure on line 33 in provisioning.go

View workflow job for this annotation

GitHub Actions / test (1.21)

no required module provides package github.com/beeper/libserv/pkg/requestlog; to add it:

Check failure on line 33 in provisioning.go

View workflow job for this annotation

GitHub Actions / lint

no required module provides package github.com/beeper/libserv/pkg/requestlog; to add it:

Check failure on line 33 in provisioning.go

View workflow job for this annotation

GitHub Actions / lint

no required module provides package github.com/beeper/libserv/pkg/requestlog; to add it:

Check failure on line 33 in provisioning.go

View workflow job for this annotation

GitHub Actions / test (1.20)

no required module provides package github.com/beeper/libserv/pkg/requestlog; to add it:

Check failure on line 33 in provisioning.go

View workflow job for this annotation

GitHub Actions / test (1.21)

no required module provides package github.com/beeper/libserv/pkg/requestlog; to add it:
"github.com/gorilla/mux"
"github.com/rs/zerolog"
"github.com/rs/zerolog/hlog"
"maunium.net/go/mautrix/id"

"go.mau.fi/mautrix-signal/pkg/signalmeow"
Expand All @@ -53,10 +55,12 @@ type ProvisioningAPI struct {
}

func (prov *ProvisioningAPI) Init() {
prov.log.Debug().Msgf("Enabling provisioning API at %v", prov.bridge.Config.Bridge.Provisioning.Prefix)
prov.log.Debug().Str("prefix", prov.bridge.Config.Bridge.Provisioning.Prefix).Msg("Enabling provisioning API")
prov.provisioningUsers = make(map[string]int)
prov.provisioningMutexes = make(map[string]*sync.Mutex)
r := prov.bridge.AS.Router.PathPrefix(prov.bridge.Config.Bridge.Provisioning.Prefix).Subrouter()
r.Use(hlog.NewHandler(prov.log))
r.Use(requestlog.AccessLogger(true))
r.Use(prov.AuthMiddleware)
r.HandleFunc("/v2/link/new", prov.LinkNew).Methods(http.MethodPost)
r.HandleFunc("/v2/link/wait/scan", prov.LinkWaitForScan).Methods(http.MethodPost)
Expand Down

0 comments on commit c13f7ec

Please sign in to comment.