refactoring, fixes and laniakea v0.8
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
"errors"
|
||||
"math"
|
||||
"time"
|
||||
"ymgb/database"
|
||||
|
||||
"git.nix13.pw/scuroneko/laniakea"
|
||||
"github.com/shopspring/decimal"
|
||||
"github.com/vinovest/sqlx"
|
||||
)
|
||||
@@ -56,8 +56,8 @@ type UserRepository struct {
|
||||
}
|
||||
|
||||
func newUserRepository(db *sqlx.DB) UserRepository { return UserRepository{db} }
|
||||
func NewUserRepository(db *laniakea.DatabaseContext) UserRepository {
|
||||
return newUserRepository(db.PostgresSQL)
|
||||
func NewUserRepository(db *database.Context) UserRepository {
|
||||
return newUserRepository(db.Postgres)
|
||||
}
|
||||
|
||||
func (rep UserRepository) GetOrCreate(tgId int, name string) (*User, error) {
|
||||
|
||||
Reference in New Issue
Block a user