- replace literal 'admin' with const
This commit is contained in:
@@ -3,6 +3,7 @@ package tasks
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/model/legacymodel"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
@@ -187,7 +188,7 @@ func SaveWeimobToken(token *weimobapi.TokenInfo) (err error) {
|
||||
Thirdparty: "weimob",
|
||||
Token: string(utils.MustMarshal(token)),
|
||||
Date: utils.Time2Str(time.Now().Add((time.Duration(token.ExpiresIn) - weimobTokenExpires/time.Second) * time.Second)),
|
||||
LastOperator: "admin",
|
||||
LastOperator: model.AdminName,
|
||||
}
|
||||
return dao.CreateOrUpdate(db, config)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user