kojiapi: add /status route
It works the same way as in the worker API. It's very handy when we just want to test whether the API is up and running.
This commit is contained in:
parent
28aff2259a
commit
c6b5dd8977
3 changed files with 47 additions and 0 deletions
|
|
@ -247,6 +247,13 @@ func (h *apiHandlers) GetComposeId(ctx echo.Context, idstr string) error {
|
|||
return ctx.JSON(http.StatusOK, response)
|
||||
}
|
||||
|
||||
// GetStatus handles a /status GET request
|
||||
func (h *apiHandlers) GetStatus(ctx echo.Context) error {
|
||||
return ctx.JSON(http.StatusOK, &api.Status{
|
||||
Status: "OK",
|
||||
})
|
||||
}
|
||||
|
||||
// A simple echo.Binder(), which only accepts application/json, but is more
|
||||
// strict than echo's DefaultBinder. It does not handle binding query
|
||||
// parameters either.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue