ft-sync/web/controller/helper.go
Simon Vieille 3af050caa0 add gorm
add history init/pull/push
2024-08-28 20:36:03 +02:00

17 lines
287 B
Go

package helper
import "github.com/labstack/echo/v4"
func Ko(c echo.Context, err error) error {
return c.JSON(400, map[string]any{
"code": 400,
"message": err,
})
}
func Ok(c echo.Context) error {
return c.JSON(201, map[string]any{
"code": 201,
"message": "ok",
})
}