Pass headers when server fetches the schedule
Fix the inital server side load of the schedule not including crew only items due to headers not being passed from the client to server side request made to fetch the schedule.
This commit is contained in:
parent
5256f3fcf8
commit
bb306ee938
1 changed files with 2 additions and 1 deletions
|
@ -5,9 +5,10 @@ let sourceRefs = 0;
|
|||
let sourceSessionId: number | undefined = undefined;
|
||||
export const useSchedule = () => {
|
||||
const { data: session } = useAccountSession();
|
||||
const requestFetch = useRequestFetch();
|
||||
const asyncData = useAsyncData<Schedule>(
|
||||
'schedule',
|
||||
() => $fetch("/api/schedule"),
|
||||
() => requestFetch("/api/schedule"),
|
||||
{ default: () => ({ events: [], locations: [] }) },
|
||||
)
|
||||
const { data: schedule } = asyncData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue