From 43fa0b02aa8797388f8fc399b9918ec809d031f8 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Tue, 9 Jan 2024 15:10:11 +1100 Subject: [PATCH] remove unneeded check --- controllers/store_secrets.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/controllers/store_secrets.go b/controllers/store_secrets.go index 65bce75..e8a2be0 100644 --- a/controllers/store_secrets.go +++ b/controllers/store_secrets.go @@ -345,23 +345,6 @@ func DeleteSecret(c *gin.Context) { log.Printf("DeleteSecret received JSON input '%v'\n", input) - if len(input.SecretValue) == 0 { - errString := "DeleteSecret no updated secret specified\n" - log.Print(errString) - c.JSON(http.StatusBadRequest, gin.H{"error": errString}) - return - } - - // Temporarily disable because we should be able to figure it out without user specifying - /* - if input.SafeId == 0 && len(input.SafeName) == 0 { - errString := "UpdateSecret no safe specified\n" - log.Print(errString) - c.JSON(http.StatusBadRequest, gin.H{"error": errString}) - return - } - */ - // Get userId that we stored in the context earlier if val, ok := c.Get("user-id"); !ok { c.JSON(http.StatusBadRequest, gin.H{"error": "error determining user"})