This commit is contained in:
2025-11-21 11:14:27 +03:00
parent 4fe13e55c6
commit bc1713cb71
5 changed files with 50 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ package database
import (
"fmt"
"kurumibot/laniakea"
"log"
"os"
@@ -25,3 +26,7 @@ func ConnectMongo() {
log.Fatalln(err)
}
}
func GetMongoCollection(db *laniakea.DatabaseContext, name string) *mongo.Collection {
return db.MongoDB.Database(os.Getenv("MONGO_NAME")).Collection(name)
}