aboutsummaryrefslogtreecommitdiff
path: root/cmd/mi/main.go
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-05-20 08:31:18 -0400
committerXe Iaso <me@xeiaso.net>2024-05-20 08:31:26 -0400
commit62fe9bdef194158ca9bb9d57e56872d2d73d121b (patch)
tree88a66b33e576a542a60d0ee60fe07596a40d7ef0 /cmd/mi/main.go
parent1d407f9d6170b535d1174ca73dfaa022d2e3d0c5 (diff)
downloadx-62fe9bdef194158ca9bb9d57e56872d2d73d121b.tar.xz
x-62fe9bdef194158ca9bb9d57e56872d2d73d121b.zip
cmd/mi: move front tracking to a shim
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/mi/main.go')
-rw-r--r--cmd/mi/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/mi/main.go b/cmd/mi/main.go
index b7ed2ce..142dbab 100644
--- a/cmd/mi/main.go
+++ b/cmd/mi/main.go
@@ -40,9 +40,12 @@ func main() {
os.Exit(1)
}
+ dao := models.New(db)
+
mux := http.NewServeMux()
mux.Handle(pb.SwitchTrackerPathPrefix, pb.NewSwitchTrackerServer(NewSwitchTracker(db)))
+ mux.Handle("/front", &HomeFrontShim{dao: dao})
i := &Importer{db: db}
i.Mount(http.DefaultServeMux)