Move plugins to express-twtkpr-core-plugins package
Add plugin structure Fix stale cache after posting Update to v0.9.0
This commit is contained in:
@@ -19,7 +19,7 @@ import NodeCache from '@cacheable/node-cache';
|
||||
export default function followingHandler(
|
||||
req: Request,
|
||||
res: Response,
|
||||
cache: NodeCache<unknown>,
|
||||
following: Twttr[],
|
||||
followingParameter: QueryParameters['following']
|
||||
) {
|
||||
const followingsToMatch = getQueryParameterArray(
|
||||
@@ -40,7 +40,7 @@ export default function followingHandler(
|
||||
if (wantsJson) res.set('content-type', 'application/json');
|
||||
else res.set('content-type', 'text/plain');
|
||||
|
||||
const matchedFollowing = (cache.get('following') as Twttr[]).filter(
|
||||
const matchedFollowing = following.filter(
|
||||
({ nick, url }) =>
|
||||
(!followingsToMatch.length ||
|
||||
(followingsToMatch.length === 1 && followingsToMatch[0] === '') ||
|
||||
|
||||
Reference in New Issue
Block a user