MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / Logout

Function Logout

controller/user.go:99–114  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

97}
98
99func Logout(c *gin.Context) {
100 session := sessions.Default(c)
101 session.Clear()
102 err := session.Save()
103 if err != nil {
104 c.JSON(http.StatusOK, gin.H{
105 "message": err.Error(),
106 "success": false,
107 })
108 return
109 }
110 c.JSON(http.StatusOK, gin.H{
111 "message": "",
112 "success": true,
113 })
114}
115
116func Register(c *gin.Context) {
117 if !common.RegisterEnabled {

Callers

nothing calls this directly

Calls 2

SaveMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected