don't select deleted

This commit is contained in:
nquidox 2025-09-22 19:53:01 +03:00
parent ca5845db93
commit 24a27fc141

View file

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