| 123456789101112131415161718192021222324 |
- // Code scaffolded by goctl. Safe to edit.
- // goctl 1.10.0
- package auth
- import (
- "net/http"
- "github.com/zeromicro/go-zero/rest/httpx"
- "perms-system-server/internal/logic/auth"
- "perms-system-server/internal/svc"
- )
- func LogoutHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- l := auth.NewLogoutLogic(r.Context(), svcCtx)
- err := l.Logout()
- if err != nil {
- httpx.ErrorCtx(r.Context(), w, err)
- } else {
- httpx.Ok(w)
- }
- }
- }
|