wallet/pkg/rest/echo_v1.go
Anton Nesterov f1bc53ce2a
[init]
2024-08-31 17:00:14 +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)
}