mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-06 15:46:37 +08:00
6bd7dc91fc
Move OpenFlare route registration from RegisterCustomRoutes to v1.RegisterV1Routes so business APIs are mounted directly at /api/v1/openflare instead of under the /custom example prefix. Update handler Swagger annotations, frontend service base paths, and regenerated swagger docs accordingly.
32 lines
916 B
TypeScript
32 lines
916 B
TypeScript
import {OpenFlareBaseService} from './base.service';
|
|
import type {
|
|
ApplyLogCleanupPayload,
|
|
ApplyLogCleanupResult,
|
|
ApplyLogList,
|
|
ApplyLogListQuery,
|
|
} from './types';
|
|
|
|
export class ApplyLogService extends OpenFlareBaseService {
|
|
protected static override readonly basePath: string = '/api/v1/openflare/apply-logs';
|
|
|
|
static list(query: ApplyLogListQuery = {}): Promise<ApplyLogList> {
|
|
const params: Record<string, unknown> = {};
|
|
|
|
const normalizedNodeId = query.node_id?.trim();
|
|
if (normalizedNodeId) {
|
|
params.node_id = normalizedNodeId;
|
|
}
|
|
if (query.pageNo) {
|
|
params.pageNo = query.pageNo;
|
|
}
|
|
if (query.pageSize) {
|
|
params.pageSize = query.pageSize;
|
|
}
|
|
|
|
return this.get<ApplyLogList>('/', params);
|
|
}
|
|
|
|
static cleanup(payload: ApplyLogCleanupPayload): Promise<ApplyLogCleanupResult> {
|
|
return this.post<ApplyLogCleanupResult>('/cleanup', payload);
|
|
}
|
|
} |