14 lines
277 B
Go
14 lines
277 B
Go
package authRoutes
|
|
|
|
import (
|
|
"enshi/global"
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func Logout(c *gin.Context) {
|
|
c.SetCookie("auth_cookie", "", -1, "/", global.DomainForCookies, false, true)
|
|
c.IndentedJSON(http.StatusOK, gin.H{"message": "you have been logged out"})
|
|
}
|