add update endpoint

This commit is contained in:
2023-04-03 09:17:42 +10:00
parent 748f4251e1
commit 931d345ec4
5 changed files with 98 additions and 6 deletions

View File

@@ -3,7 +3,6 @@ package controllers
import (
"ccsecrets/models"
"ccsecrets/utils/token"
"errors"
"fmt"
"net/http"
@@ -53,7 +52,7 @@ func RetrieveSecret(c *gin.Context) {
}
if len(results) > 1 {
c.JSON(http.StatusBadRequest, gin.H{"error": errors.New("found multiple matching secrets, use retrieveMultiple instead")})
c.JSON(http.StatusBadRequest, gin.H{"error": "found multiple matching secrets, use retrieveMultiple instead"})
return
}