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.

16 lines
227 B

3 years ago
  1. package api
  2. import (
  3. "net/http"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func (a *API) getState(c *gin.Context) {
  7. ni, err := a.h.GetNodeInfoAPI()
  8. if err != nil {
  9. retBadReq(err, c)
  10. return
  11. }
  12. c.JSON(http.StatusOK, ni.StateAPI)
  13. }