token expire
This commit is contained in:
parent
e00f16a847
commit
5d6e786c02
|
@ -40,7 +40,7 @@ func (s *StaffUser) Login(sess *session.AdminSession, req *api.StaffLoginReq) in
|
|||
|
||||
token := new(model.StaffToken)
|
||||
token.UserId = user.Id
|
||||
token.ExpireTime = time.Now().Unix() + 86400
|
||||
token.ExpireTime = time.Now().Unix() + 86400*30
|
||||
token.Token = uuid.New().String()
|
||||
_, err = dao.NewStaffTokenDao().Create(token)
|
||||
session.CheckDBError(err)
|
||||
|
|
Loading…
Reference in New Issue