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:
parent
a95593aa88
commit
728b0eb28c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user