cslogouthandler.go 450 B

123456789101112131415161718192021
  1. package cmd
  2. import (
  3. "net/http"
  4. "github.com/zeromicro/go-zero/rest/httpx"
  5. "ylink/bff/apibff/api/internal/logic/cs/cmd"
  6. "ylink/bff/apibff/api/internal/svc"
  7. )
  8. func CsLogoutHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
  9. return func(w http.ResponseWriter, r *http.Request) {
  10. l := cmd.NewCsLogoutLogic(r.Context(), svcCtx)
  11. resp, err := l.CsLogout()
  12. if err != nil {
  13. httpx.Error(w, err)
  14. } else {
  15. httpx.OkJson(w, resp)
  16. }
  17. }
  18. }