mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
20 lines
364 B
Go
20 lines
364 B
Go
package internal
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type answer struct {
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
func SendErrorMessageToClient(c *gin.Context, message string) {
|
|
c.JSON(http.StatusBadRequest, answer{Message: message})
|
|
}
|
|
|
|
func SendOkMessageToClient(c *gin.Context, message string) {
|
|
c.JSON(http.StatusOK, answer{Message: message})
|
|
}
|