refactoring, fixes and laniakea v0.8
This commit is contained in:
@@ -2,8 +2,8 @@ package red
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"ymgb/database"
|
||||
|
||||
"git.nix13.pw/scuroneko/laniakea"
|
||||
"github.com/google/uuid"
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
@@ -12,7 +12,7 @@ type AiRepository struct {
|
||||
client *redis.Client
|
||||
}
|
||||
|
||||
func NewAiRepository(db *laniakea.DatabaseContext) AiRepository {
|
||||
func NewAiRepository(db *database.Context) AiRepository {
|
||||
return AiRepository{client: db.Redis}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"kurumibot/database/psql"
|
||||
"kurumibot/utils"
|
||||
"strings"
|
||||
"ymgb/database"
|
||||
"ymgb/database/psql"
|
||||
"ymgb/utils"
|
||||
|
||||
"git.nix13.pw/scuroneko/laniakea"
|
||||
"github.com/google/uuid"
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
@@ -18,7 +18,7 @@ var ctx = context.Background()
|
||||
|
||||
type RPRepository struct {
|
||||
client *redis.Client
|
||||
db *laniakea.DatabaseContext
|
||||
db *database.Context
|
||||
}
|
||||
|
||||
type RPChat struct {
|
||||
@@ -35,7 +35,7 @@ type RPChat struct {
|
||||
Scenarios []psql.RPScenario
|
||||
}
|
||||
|
||||
func NewRPRepository(db *laniakea.DatabaseContext) RPRepository {
|
||||
func NewRPRepository(db *database.Context) RPRepository {
|
||||
return RPRepository{db.Redis, db}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user