Skip to content

Commit

Permalink
Properly delete deleted URLs (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
bueti committed Dec 22, 2023
1 parent 628e61c commit c8007b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/model/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (u *UrlModel) GetUrlByUser(userId uuid.UUID) (*[]UrlByUserResponse, error)

func (u *UrlModel) Delete(urlUUID uuid.UUID) error {
url := new(Url)
result := u.DB.Where("id = ?", urlUUID).Delete(&url)
result := u.DB.Where("id = ?", urlUUID).Unscoped().Delete(&url)
if result.Error != nil {
return result.Error
}
Expand Down

0 comments on commit c8007b4

Please sign in to comment.