From 7582857d01bb51ecb70e6461df4e694350c42733 Mon Sep 17 00:00:00 2001 From: Suraj Mahto <84609578+surajhub255@users.noreply.github.com> Date: Wed, 28 Aug 2024 07:14:01 +0000 Subject: [PATCH] feat : remove extra checking for delete --- controllers/profile_controller.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/controllers/profile_controller.go b/controllers/profile_controller.go index 73c0c93..2c32693 100644 --- a/controllers/profile_controller.go +++ b/controllers/profile_controller.go @@ -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"}) }