logout.go 368 B

123456789101112131415
  1. package base
  2. import (
  3. "github.com/allanpk716/ChineseSubFinder/internal/backend/common"
  4. "github.com/allanpk716/ChineseSubFinder/internal/types/backend"
  5. "github.com/gin-gonic/gin"
  6. "net/http"
  7. )
  8. func (cb ControllerBase) LogoutHandler(c *gin.Context) {
  9. // 注销
  10. common.SetAccessToken("")
  11. c.JSON(http.StatusOK, backend.ReplyCommon{Message: "ok, need ReLogin"})
  12. }