remove unneeded check
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-09 15:10:11 +11:00
parent 6423d83949
commit 43fa0b02aa

View File

@@ -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"})