wallet/pkg/rest/echo_v1.go

19 lines
304 B
Go
Raw Normal View History

2024-08-31 14:46:20 +00:00
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)
}