featurer/server/internal/services/core/http/replies.go

11 lines
224 B
Go
Raw Permalink Normal View History

package http
import (
"github.com/gin-gonic/gin"
)
func (h *http) ReplyJSON(ctx *gin.Context, statusCode int, data interface{}) {
ctx.Writer.Header().Add("Content-Type", "application/json")
ctx.JSON(statusCode, data)
}