refactoring, fixes and laniakea v0.8
This commit is contained in:
@@ -2,10 +2,9 @@ package mdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"kurumibot/database"
|
||||
"time"
|
||||
"ymgb/database"
|
||||
|
||||
"git.nix13.pw/scuroneko/laniakea"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
)
|
||||
|
||||
@@ -22,7 +21,7 @@ type CodeEntry struct {
|
||||
TotalUsages uint `bson:"totalUsages"`
|
||||
}
|
||||
|
||||
func FindCode(db *laniakea.DatabaseContext, code string) (CodeEntry, error) {
|
||||
func FindCode(db *database.Context, code string) (CodeEntry, error) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
collection := database.GetMongoCollection(db, "codes")
|
||||
|
||||
Reference in New Issue
Block a user