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

chore!: remove deprecated get metrics traffic (#10064)

https://linear.app/unleash/issue/2-3370/remove-get-apiadminmetricstrafficperiod-deprecated-in-680

Removes GET `/api/admin/metrics/traffic/{period}` which was deprecated
in v6.8.
Also cleans up related code.

For OSS this means switching to `/traffic` using an expand and contract
approach. We can drop the `/traffic-search` endpoint in Enterprise after
this is merged.
This commit is contained in:
Nuno Góis 2025-06-03 10:24:48 +01:00 committed by GitHub
parent f7c667e410
commit c24c58c51c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,7 @@ export const useTrafficSearch = (
to: string;
},
): InstanceTrafficMetricsResponse => {
const apiPath = `api/admin/metrics/traffic-search?grouping=${grouping}&from=${from}&to=${to}`;
const apiPath = `api/admin/metrics/traffic?grouping=${grouping}&from=${from}&to=${to}`;
const { data, error, mutate } = useSWR(formatApiPath(apiPath), fetcher);