some fixes

This commit is contained in:
2026-01-22 21:21:30 +03:00
parent 331f6854b6
commit 4d543a2260
3 changed files with 7 additions and 6 deletions

View File

@@ -88,6 +88,6 @@ func (rep *WaifuRepository) GetById(id int) (*Waifu, error) {
return waifu, err
}
waifu.Owner = new(User)
err = rep.db.Get(waifu, "SELECT * FROM users WHERE id=$1;", int(waifu.OwnerID.Int64))
err = rep.db.Get(waifu.Owner, "SELECT * FROM users WHERE id=$1;", int(waifu.OwnerID.Int64))
return waifu, err
}