clearcachehandler.go 575 B

12345678910111213141516171819202122232425
  1. // Code scaffolded by goctl. Safe to edit.
  2. // goctl 1.10.2
  3. package custompage
  4. import (
  5. "net/http"
  6. "github.com/zeromicro/go-zero/rest/httpx"
  7. "udeServer/internal/logic/custompage"
  8. "udeServer/internal/svc"
  9. )
  10. // 复位自定义页面信息
  11. func ClearCacheHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
  12. return func(w http.ResponseWriter, r *http.Request) {
  13. l := custompage.NewClearCacheLogic(r.Context(), svcCtx)
  14. resp, err := l.ClearCache()
  15. if err != nil {
  16. httpx.ErrorCtx(r.Context(), w, err)
  17. } else {
  18. httpx.OkJsonCtx(r.Context(), w, resp)
  19. }
  20. }
  21. }