ted one-time api

This commit is contained in:
Mazyar
2026-02-23 15:40:20 +03:30
parent 80befb51c7
commit e0e8b9cf04
7 changed files with 234 additions and 5 deletions
+9
View File
@@ -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{