19 lines
304 B
Go
19 lines
304 B
Go
package rest
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
|
|
gin "github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func EchoV1(c *gin.Context) {
|
|
var req gin.H
|
|
if err := c.ShouldBindJSON(&req); err != nil {
|
|
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
|
return
|
|
}
|
|
fmt.Println("EchoV1: ", req)
|
|
c.JSON(http.StatusOK, req)
|
|
}
|