12345678910111213141516171819202122232425262728 |
- package v1
- import (
- "fmt"
- "gin-vue-admin/global/response"
- "gin-vue-admin/model"
- "github.com/gin-gonic/gin"
- )
- func JsonInBlacklist(c *gin.Context) {
- token := c.Request.Header.Get("x-token")
- ModelJwt := model.JwtBlacklist{
- Jwt: token,
- }
- err := ModelJwt.JsonInBlacklist()
- if err != nil {
- response.Result(response.ERROR, gin.H{}, fmt.Sprintf("jwt作废失败,%v", err), c)
- } else {
- response.Result(response.SUCCESS, gin.H{}, "jwt作废成功", c)
- }
- }
|