Skip to content

Commit

Permalink
fix: hard delete share code
Browse files Browse the repository at this point in the history
  • Loading branch information
truc9 committed Dec 13, 2024
1 parent 530f2be commit 38b46ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/handler/sharecode.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (h *ShareCodeHandler) GetShareUrls(c *gin.Context) {

func (h *ShareCodeHandler) DeleteShareCodeUrl(c *gin.Context) {
id := param.FromRoute(c, "shareCodeId")
if err := h.db.Delete(&domain.ShareCode{}, id).Error; err != nil {
if err := h.db.Delete(&domain.ShareCode{}, id).Unscoped().Error; err != nil {
c.JSON(http.StatusInternalServerError, err)
return
}
Expand Down

0 comments on commit 38b46ae

Please sign in to comment.