This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"smt/models"
|
||||
"errors"
|
||||
"log"
|
||||
"net/http"
|
||||
"smt/models"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -23,7 +23,7 @@ func StoreSecret(c *gin.Context) {
|
||||
var input StoreInput
|
||||
|
||||
if err := c.ShouldBindJSON(&input); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "invalid JSON received : " + err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user