This commit is contained in:
ryan
2026-07-13 15:08:40 +08:00
parent 08e8eea932
commit 1eff7878a1
441 changed files with 26491 additions and 18405 deletions
@@ -16,12 +16,12 @@ import type {
function buildSearchParams(filters: object): Record<string, unknown> {
const params: Record<string, unknown> = {};
Object.entries(filters as Record<string, string | number | undefined>).forEach(
([key, value]) => {
if (value === undefined || value === null || value === '') return;
params[key] = value;
},
);
Object.entries(
filters as Record<string, string | number | undefined>,
).forEach(([key, value]) => {
if (value === undefined || value === null || value === '') return;
params[key] = value;
});
return params;
}
@@ -35,10 +35,7 @@ export class AccessLogService extends OpenFlareBaseService {
static listFolds(
filters: FoldedAccessLogFilters,
): Promise<FoldedAccessLogList> {
return this.get<FoldedAccessLogList>(
'/folds',
buildSearchParams(filters),
);
return this.get<FoldedAccessLogList>('/folds', buildSearchParams(filters));
}
static listFoldIPs(
@@ -73,4 +70,4 @@ export class AccessLogService extends OpenFlareBaseService {
): Promise<AccessLogCleanupResult> {
return this.post<AccessLogCleanupResult>('/cleanup', payload);
}
}
}