forked from free-lancers/electricity_bill_calc_service
feat(route):加入安全相关中间件,绑定用户登录路由。
This commit is contained in:
@@ -11,11 +11,11 @@ type LoginResponse struct {
|
||||
Session *model.Session `json:"session,omitempty"`
|
||||
}
|
||||
|
||||
func (r *Result) LoginSuccess(session *model.Session, needReset bool) {
|
||||
func (r *Result) LoginSuccess(session *model.Session) {
|
||||
res := &LoginResponse{}
|
||||
res.Code = http.StatusOK
|
||||
res.Message = "用户已成功登录。"
|
||||
res.NeedReset = needReset
|
||||
res.NeedReset = false
|
||||
res.Session = session
|
||||
r.Ctx.JSON(http.StatusOK, res)
|
||||
}
|
||||
|
Reference in New Issue
Block a user