tangled
alpha
login
or
join now
danabra.mov
/
sidetrail
49
fork
atom
an app to share curated trails
sidetrail.app
atproto
nextjs
react
rsc
49
fork
atom
overview
issues
pulls
pipelines
rip https://github.com/vercel/next.js/issues/86896
danabra.mov
3 months ago
7486fd72
870b64b5
+6
-4
2 changed files
expand all
collapse all
unified
split
cache
handlers
redis.js
data
queries.ts
+3
-1
cache/handlers/redis.js
···
85
85
// Redis
86
86
try {
87
87
const stored = await getRedis().get(CACHE_PREFIX + cacheKey);
88
88
-
if (!stored) return undefined;
88
88
+
if (!stored) {
89
89
+
return undefined;
90
90
+
}
89
91
90
92
const data = JSON.parse(stored);
91
93
+3
-3
data/queries.ts
···
156
156
157
157
async function batchResolveHandles(dids: string[]): Promise<Map<string, string>> {
158
158
const unique = [...new Set(dids)];
159
159
-
const results = await Promise.all(unique.map(resolveDidToHandle));
159
159
+
const results = await Promise.all(unique.map((did) => resolveDidToHandle(did)));
160
160
return new Map(unique.map((did, i) => [did, results[i]]));
161
161
}
162
162
···
191
191
if (unique.length === 0) return new Map();
192
192
193
193
const [handles, avatars] = await Promise.all([
194
194
-
Promise.all(unique.map(resolveDidToHandle)),
195
195
-
Promise.all(unique.map(tryFetchBskyAvatar)),
194
194
+
Promise.all(unique.map((did) => resolveDidToHandle(did))),
195
195
+
Promise.all(unique.map((did) => tryFetchBskyAvatar(did))),
196
196
]);
197
197
198
198
return new Map(unique.map((did, i) => [did, { did, handle: handles[i], avatar: avatars[i] }]));