This commit is contained in:
@@ -345,23 +345,6 @@ func DeleteSecret(c *gin.Context) {
|
|||||||
|
|
||||||
log.Printf("DeleteSecret received JSON input '%v'\n", input)
|
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
|
// Get userId that we stored in the context earlier
|
||||||
if val, ok := c.Get("user-id"); !ok {
|
if val, ok := c.Get("user-id"); !ok {
|
||||||
c.JSON(http.StatusBadRequest, gin.H{"error": "error determining user"})
|
c.JSON(http.StatusBadRequest, gin.H{"error": "error determining user"})
|
||||||
|
Reference in New Issue
Block a user