Update to stupid-backend v2

Moved darkstormtech to new UnKeyedApp
This commit is contained in:
Caleb Gardner
2023-12-03 01:58:58 -06:00
parent cd65b18ad9
commit eb9b687994
4 changed files with 50 additions and 47 deletions
+3 -3
View File
@@ -11,8 +11,8 @@ import (
"github.com/CalebQ42/cdr-backend"
"github.com/CalebQ42/darkstorm-server/internal/darkstormtech"
"github.com/CalebQ42/stupid-backend"
"github.com/CalebQ42/stupid-backend/pkg/db"
"github.com/CalebQ42/stupid-backend/v2"
"github.com/CalebQ42/stupid-backend/v2/db"
swassistantbackend "github.com/CalebQ42/swassistant-backend"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
@@ -24,7 +24,7 @@ func setupStupid(keyPath, mongoStr string) error {
log.Println("Issues connecting to mongo:", err)
return err
}
stupid := stupid.NewStupidBackend(db.NewMongoTable(client.Database("stupid").Collection("keys")), map[string]stupid.App{
stupid := stupid.NewStupidBackend(db.NewMongoTable(client.Database("stupid").Collection("keys")), map[string]any{
"swassistant": swassistantbackend.NewSWBackend(client),
"cdr": cdr.NewBackend(client),
"darkstormtech": darkstormtech.NewDarkstormTech(client, filepath.Join(flag.Arg(0), "files")),