style: auto-fix lint and format
This commit is contained in:
1 parent
e93b5f6469
commit
0fd495c277
2 files changed
+11
-3
No files matched your search
@@ -10,7 +10,9 @@ const logger = createLogger({ module: "releaseProviders" });
|
|||||||
|
|
||||||
const PROVIDER_TIMEOUT_MS = 10_000;
|
const PROVIDER_TIMEOUT_MS = 10_000;
|
||||||
const fetchProvider = (url: string, options?: RequestInit & { timeout?: number }) =>
|
const fetchProvider = (url: string, options?: RequestInit & { timeout?: number }) =>
|
||||||
fetchWithTrustedCertificatesAsync(url, { timeout: PROVIDER_TIMEOUT_MS, ...options } as Parameters<typeof fetchWithTrustedCertificatesAsync>[1]);
|
fetchWithTrustedCertificatesAsync(url, { timeout: PROVIDER_TIMEOUT_MS, ...options } as Parameters<
|
||||||
|
typeof fetchWithTrustedCertificatesAsync
|
||||||
|
>[1]);
|
||||||
|
|
||||||
export interface ReleasesRepositoryRequest extends Record<string, unknown> {
|
export interface ReleasesRepositoryRequest extends Record<string, unknown> {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@@ -32,14 +32,20 @@ export interface Timetable {
|
|||||||
|
|
||||||
const supportedStationTypes = ["bus", "tram", "train", "ship", "cablecar", "funicular", "chairlift"];
|
const supportedStationTypes = ["bus", "tram", "train", "ship", "cablecar", "funicular", "chairlift"];
|
||||||
|
|
||||||
export const timetableSearchStationsRequestHandler = createRequestHandler<Station[], { baseUrl: string; query: string }>({
|
export const timetableSearchStationsRequestHandler = createRequestHandler<
|
||||||
|
Station[],
|
||||||
|
{ baseUrl: string; query: string }
|
||||||
|
>({
|
||||||
async requestAsync(input) {
|
async requestAsync(input) {
|
||||||
return await searchStationsAsync(input.baseUrl, input.query);
|
return await searchStationsAsync(input.baseUrl, input.query);
|
||||||
},
|
},
|
||||||
cacheTtlMs: 24 * 60 * 60 * 1000,
|
cacheTtlMs: 24 * 60 * 60 * 1000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const timetableGetTimetableRequestHandler = createRequestHandler<Timetable, { baseUrl: string; stationId: string; limit: number }>({
|
export const timetableGetTimetableRequestHandler = createRequestHandler<
|
||||||
|
Timetable,
|
||||||
|
{ baseUrl: string; stationId: string; limit: number }
|
||||||
|
>({
|
||||||
async requestAsync(input) {
|
async requestAsync(input) {
|
||||||
return await getTimetableAsync(input.baseUrl, { stationId: input.stationId, limit: input.limit });
|
return await getTimetableAsync(input.baseUrl, { stationId: input.stationId, limit: input.limit });
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user