You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
413 B

  1. package controller
  2. import (
  3. "context"
  4. "net/http"
  5. "github.com/AFASystems/presence/internal/pkg/api/response"
  6. "github.com/AFASystems/presence/internal/pkg/common/appcontext"
  7. )
  8. func HealthController(appState *appcontext.AppState, context context.Context) http.HandlerFunc {
  9. return func(w http.ResponseWriter, r *http.Request) {
  10. health := appState.GetHealth()
  11. response.JSON(w, http.StatusOK, health)
  12. }
  13. }