mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-18 06:09:58 +00:00
reddit: fix expiry check
merge pull request #247 from dumbmoron/fix-reddit-expiry
This commit is contained in:
commit
561c9f1dfd
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ async function getAccessToken() {
|
|||
const values = cookie.values(),
|
||||
needRefresh = !values.access_token
|
||||
|| !values.expiry
|
||||
|| Number(values.expiry) > new Date().getTime();
|
||||
|| Number(values.expiry) < new Date().getTime();
|
||||
if (!needRefresh) return values.access_token;
|
||||
|
||||
const data = await fetch('https://www.reddit.com/api/v1/access_token', {
|
||||
|
|
Loading…
Reference in a new issue