mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-24 02:08:55 +08:00
fix(route/twitter): await when get cache (#17429)
This commit is contained in:
@@ -14,8 +14,9 @@ import login from './login';
|
||||
let authTokenIndex = 0;
|
||||
|
||||
const token2Cookie = async (token) => {
|
||||
if (cache.get(`twitter:cookie:${token}`)) {
|
||||
return cache.get(`twitter:cookie:${token}`);
|
||||
const c = await cache.get(`twitter:cookie:${token}`);
|
||||
if (c) {
|
||||
return c;
|
||||
}
|
||||
const jar = new CookieJar();
|
||||
jar.setCookieSync(`auth_token=${token}`, 'https://x.com');
|
||||
|
||||
Reference in New Issue
Block a user