Explorar o código

s/message/error/

Michael Yang hai 1 ano
pai
achega
7e547c6833
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/routes.go

+ 1 - 1
server/routes.go

@@ -350,7 +350,7 @@ func PushModelHandler(c *gin.Context) {
 func CreateModelHandler(c *gin.Context) {
 	var req api.CreateRequest
 	if err := c.ShouldBindJSON(&req); err != nil {
-		c.JSON(http.StatusBadRequest, gin.H{"message": err.Error()})
+		c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
 		return
 	}