refactor: SessionUser -> SessionUsername

Signed-off-by: Kininaru <shiftregister233@outlook.com>
This commit is contained in:
Kininaru
2021-07-18 07:15:22 +08:00
committed by Yang Luo
parent 59602a1325
commit d83b86df37
6 changed files with 16 additions and 16 deletions

View File

@ -20,7 +20,7 @@ type ApiController struct {
beego.Controller
}
func (c *ApiController) GetSessionUser() string {
func (c *ApiController) GetSessionUsername() string {
user := c.GetSession("username")
if user == nil {
return ""
@ -29,7 +29,7 @@ func (c *ApiController) GetSessionUser() string {
return user.(string)
}
func (c *ApiController) SetSessionUser(user string) {
func (c *ApiController) SetSessionUsername(user string) {
c.SetSession("username", user)
}