don't select deleted
This commit is contained in:
parent
ca5845db93
commit
24a27fc141
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue