Skip to content

Commit da4e3a2

Browse files
fixed autorenew logic
1 parent db3c1fa commit da4e3a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class OpenApi {
115115
}
116116

117117
async renewToken(token: string) {
118-
return await axios.patch(this.getOauthUrl() + '/token/' + token, { expire: 86400 + 365 }, {
118+
return await axios.patch(this.getOauthUrl() + '/token/' + token, { expire: 31536000 + Math.round(Date.now() / 1000) }, {
119119
auth: { username: this.username, password: this.apiKey }
120120
});
121121
}

0 commit comments

Comments
 (0)