mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
update getSessionActivity / getWebsiteSession
This commit is contained in:
parent
c7d39a3e94
commit
a1c0ec9c81
7 changed files with 69 additions and 30 deletions
|
|
@ -1,12 +1,17 @@
|
|||
import { useApi } from './useApi';
|
||||
|
||||
export function useSessionActivity(websiteId: string, sessionId: string) {
|
||||
export function useSessionActivity(
|
||||
websiteId: string,
|
||||
sessionId: string,
|
||||
startDate: string,
|
||||
endDate: string,
|
||||
) {
|
||||
const { get, useQuery } = useApi();
|
||||
|
||||
return useQuery({
|
||||
queryKey: ['session:activity', { websiteId, sessionId }],
|
||||
queryFn: () => {
|
||||
return get(`/websites/${websiteId}/sessions/${sessionId}/activity`);
|
||||
return get(`/websites/${websiteId}/sessions/${sessionId}/activity`, { startDate, endDate });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue