1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-13 13:48:59 +02:00

Add type to method

This commit is contained in:
Thomas Heartman 2025-07-16 11:14:19 +02:00
parent a95593aa88
commit 728b0eb28c

View File

@ -28,6 +28,7 @@ import type { CustomMetricsSchema } from '../../../openapi/spec/custom-metrics-s
import type { StoredCustomMetric } from '../custom/custom-metrics-store.js';
import type { CustomMetricsService } from '../custom/custom-metrics-service.js';
import type { MetricsTranslator } from '../impact/metrics-translator.js';
import type { ClientMetricsSchema } from '../../../server-impl.js';
export default class ClientMetricsController extends Controller {
logger: Logger;
@ -147,7 +148,10 @@ export default class ClientMetricsController extends Controller {
// Note: Custom metrics GET endpoints are now handled by the admin API
}
async registerMetrics(req: IAuthRequest, res: Response): Promise<void> {
async registerMetrics(
req: IAuthRequest<ClientMetricsSchema>,
res: Response,
): Promise<void> {
if (this.config.flagResolver.isEnabled('disableMetrics')) {
res.status(204).end();
} else {