feat: add GET method of logout API (#903)

This commit is contained in:
leoshine
2022-07-22 21:13:49 +08:00
committed by GitHub
parent 3e4dbc2dcb
commit 6f6159be07
5 changed files with 266 additions and 10 deletions

View File

@ -228,7 +228,7 @@ func (c *ApiController) Signup() {
// @Tag Login API
// @Description logout the current user
// @Success 200 {object} controllers.Response The Response object
// @router /logout [post]
// @router /logout [get,post]
func (c *ApiController) Logout() {
user := c.GetSessionUsername()
util.LogInfo(c.Ctx, "API: [%s] logged out", user)