add tokenType to the willAccessTokenList event in the API and Transfer Token

This commit is contained in:
Simone Taeggi 2023-02-15 17:38:38 +01:00
parent abcb2b13ef
commit f01ac88aa2
2 changed files with 8 additions and 1 deletions

View File

@ -65,7 +65,9 @@ const ApiTokenListView = () => {
} = useQuery(
['api-tokens'],
async () => {
trackUsage('willAccessTokenList');
trackUsage('willAccessTokenList', {
tokenType: API_TOKEN_TYPE,
});
const {
data: { data },
} = await get(`/admin/api-tokens`);

View File

@ -11,6 +11,7 @@ import {
NoPermissions,
useRBAC,
NoContent,
useTracking,
useGuidedTour,
LinkButton,
useFetchClient,
@ -34,6 +35,7 @@ const TransferTokenListView = () => {
allowedActions: { canCreate, canDelete, canUpdate, canRead },
} = useRBAC(adminPermissions.settings['transfer-tokens']);
const { push } = useHistory();
const { trackUsage } = useTracking();
const { startSection } = useGuidedTour();
const startSectionRef = useRef(startSection);
@ -64,6 +66,9 @@ const TransferTokenListView = () => {
} = useQuery(
['transfer-tokens'],
async () => {
trackUsage('willAccessTokenList', {
tokenType: TRANSFER_TOKEN_TYPE,
});
const {
data: { data },
} = await get(`/admin/transfer/tokens`);