19 lines
364 B
Go
19 lines
364 B
Go
package v1
|
|
|
|
import (
|
|
"git.roboces.dev/catalin/cvvvvv/pkg/logger"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type dataResponse struct {
|
|
Data interface{} `json:"data"`
|
|
}
|
|
|
|
type response struct {
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
func newResponse(c *gin.Context, statusCode int, message string) {
|
|
logger.Error(message)
|
|
c.AbortWithStatusJSON(statusCode, response{message})
|
|
}
|