ai work
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
|
||||
type Waifu struct {
|
||||
ID int
|
||||
OwnerID int
|
||||
Owner *User
|
||||
Name string
|
||||
Rarity int
|
||||
ExpBonus decimal.Decimal
|
||||
@@ -15,9 +17,7 @@ type Waifu struct {
|
||||
MarketPrice decimal.Decimal
|
||||
Fandom string
|
||||
Image string
|
||||
|
||||
OwnerID int
|
||||
Owner *User
|
||||
RpPrompt string
|
||||
}
|
||||
|
||||
func GetAllWaifus() ([]*Waifu, error) {
|
||||
@@ -50,7 +50,7 @@ func GetFreeWaifusWithRarity(rarity int) ([]*Waifu, error) {
|
||||
return waifus, tx.Error
|
||||
}
|
||||
|
||||
func GetWaifuById(id int) (*Waifu, error) {
|
||||
func GetWaifuById(id uint) (*Waifu, error) {
|
||||
waifu := new(Waifu)
|
||||
tx := database.PostgresDatabase.Joins("Owner").Find(waifu, id)
|
||||
return waifu, tx.Error
|
||||
|
||||
Reference in New Issue
Block a user