mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 03:25:40 +01:00
12 lines
506 B
TypeScript
12 lines
506 B
TypeScript
import { useApi } from '../useApi';
|
|
|
|
export function useSessionData(websiteId: string, sessionId: string) {
|
|
const { get, useQuery } = useApi();
|
|
|
|
return useQuery({
|
|
queryKey: ['session:data', { websiteId, sessionId }],
|
|
queryFn: () => {
|
|
return get(`/websites/${websiteId}/sessions/${sessionId}/properties`, { websiteId }, { headers: { 'CF-Access-Client-Id': '571942449727ad914a422562e7931a4a.access', 'CF-Access-Client-Secret': '571942449727ad914a422562e7931a4a.secret' } });
|
|
},
|
|
});
|
|
}
|