From 16a0cf7e9b46fbac68e8ca08b56ec8431345fe47 Mon Sep 17 00:00:00 2001 From: Caleb Gardner Date: Mon, 5 Feb 2024 11:23:01 -0600 Subject: [PATCH] FlexMLS support --- internal/flexmls/app.go | 14 ++++++++++++++ stupid.go | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 internal/flexmls/app.go diff --git a/internal/flexmls/app.go b/internal/flexmls/app.go new file mode 100644 index 0000000..99c7e62 --- /dev/null +++ b/internal/flexmls/app.go @@ -0,0 +1,14 @@ +package flexmls + +import ( + "github.com/CalebQ42/stupid-backend/v2/defaultapp" + "go.mongodb.org/mongo-driver/mongo" +) + +type FlexMLS struct { + *defaultapp.App +} + +func NewBackend(client *mongo.Client) *FlexMLS { + return &FlexMLS{defaultapp.NewDefaultApp(client.Database("flexmls"))} +} diff --git a/stupid.go b/stupid.go index c79b9e9..589360f 100644 --- a/stupid.go +++ b/stupid.go @@ -11,6 +11,7 @@ import ( "github.com/CalebQ42/cdr-backend" "github.com/CalebQ42/darkstorm-server/internal/darkstormtech" + "github.com/CalebQ42/darkstorm-server/internal/flexmls" "github.com/CalebQ42/stupid-backend/v2" "github.com/CalebQ42/stupid-backend/v2/db" swassistantbackend "github.com/CalebQ42/swassistant-backend" @@ -28,6 +29,7 @@ func setupStupid(keyPath, mongoStr string) error { "swassistant": swassistantbackend.NewSWBackend(client), "cdr": cdr.NewBackend(client), "darkstormtech": darkstormtech.NewDarkstormTech(client, filepath.Join(flag.Arg(0), "files")), + "flexmls": flexmls.NewBackend(client), }, "https://darkstorm.tech") users := true var pub, priv []byte