model fix

This commit is contained in:
nquidox 2025-09-18 17:24:02 +03:00
parent ff81fcc1ce
commit 5952c8e320

View file

@ -76,7 +76,7 @@ func (r *Repo) getSingleMerch(userUuid, merchUuid string) (merchBundle, error) {
func (r *Repo) getAllMerch(userUuid string) ([]ListResponse, error) {
var list []ListResponse
if err := r.db.Where("user_uuid = ?", userUuid).Find(&list).Error; err != nil {
if err := r.db.Model(&Merch{}).Where("user_uuid = ?", userUuid).Find(&list).Error; err != nil {
return nil, err
}
return list, nil