mcs.go 492 B

12345678910111213141516171819202122232425262728293031
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "kpt.xdmy/apiserver/model"
  5. "kpt.xdmy/apiserver/model/http"
  6. )
  7. func McsControl(c *gin.Context) {
  8. mpd := new(model.McsPostDataReq)
  9. if !Bind(c, mpd) {
  10. return
  11. }
  12. resp, err := svc.McsPostHttp(mpd)
  13. eJSON(c, resp, err)
  14. }
  15. func McsAccounts(c *gin.Context) {
  16. sa := []model.McsAccount{
  17. {
  18. DeviceId: "apptest2",
  19. UserID: "PC",
  20. Password: "mcs8",
  21. },
  22. }
  23. resp := &http.Response{
  24. Code: 200,
  25. Data: sa,
  26. }
  27. eJSON(c, resp, nil)
  28. }