fix: address PR review findings
- Strip integration secrets from server cache keys (security) - Add max size + TTL eviction to in-process cache Map (memory) - Scope widget refresh + cache age to current widget kind (UX) - Remove double caching in update-checker (simplicity) - Simplify timetable router (verbosity) - Fix update-checker import path
This commit is contained in:
6 files changed
+33
-34
No files matched your search
@@ -19,14 +19,7 @@ export const timetableRouter = createTRPCRouter({
|
||||
}),
|
||||
)
|
||||
.query(async ({ input }) => {
|
||||
const innerHandler = timetableGetTimetableRequestHandler.handler({
|
||||
baseUrl: input.baseUrl,
|
||||
stationId: input.stationId,
|
||||
limit: input.limit,
|
||||
});
|
||||
|
||||
const { data } = await innerHandler.getDataAsync();
|
||||
|
||||
const { data } = await timetableGetTimetableRequestHandler.handler(input).getDataAsync();
|
||||
return data;
|
||||
}),
|
||||
searchStations: publicProcedure
|
||||
@@ -37,13 +30,7 @@ export const timetableRouter = createTRPCRouter({
|
||||
}),
|
||||
)
|
||||
.query(async ({ input }) => {
|
||||
const innerHandler = timetableSearchStationsRequestHandler.handler({
|
||||
baseUrl: input.baseUrl,
|
||||
query: input.query,
|
||||
});
|
||||
|
||||
const { data } = await innerHandler.getDataAsync();
|
||||
|
||||
const { data } = await timetableSearchStationsRequestHandler.handler(input).getDataAsync();
|
||||
return data;
|
||||
}),
|
||||
});
|
||||
Reference in new issue
Block a user