Skip to content

Commit

Permalink
feat : remove extra checking for delete
Browse files Browse the repository at this point in the history
  • Loading branch information
surajhub255 committed Aug 28, 2024
1 parent db1bc9b commit 7582857
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions controllers/profile_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ func DeleteProfileByWalletAndEmail(c *gin.Context) {
return
}

// Check if a profile was actually deleted
if db.DB.RowsAffected == 0 {
c.JSON(http.StatusNotFound, gin.H{"error": "Profile not found"})
return
}

c.JSON(http.StatusOK, gin.H{"message": "Profile deleted successfully"})
}

Expand Down

0 comments on commit 7582857

Please sign in to comment.