ted one-time api
This commit is contained in:
@@ -68,6 +68,15 @@ func Created(c echo.Context, data interface{}, message string) error {
|
||||
})
|
||||
}
|
||||
|
||||
// Accepted returns a 202 Accepted response (for async operations)
|
||||
func Accepted(c echo.Context, data interface{}, message string) error {
|
||||
return c.JSON(http.StatusAccepted, APIResponse{
|
||||
Success: true,
|
||||
Message: message,
|
||||
Data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// BadRequest returns a 400 Bad Request response
|
||||
func BadRequest(c echo.Context, message, details string) error {
|
||||
return c.JSON(http.StatusBadRequest, APIResponse{
|
||||
|
||||
Reference in New Issue
Block a user