wallet/pkg/rest/echo_v1.go
Anton Nesterov 1382da92a3
[init]
2024-08-31 16:46:20 +02:00

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)
}