Skip to content
Snippets Groups Projects
Commit f93af05c authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

fix: avoid not-found redirect for timeslot episode editor

We need to wait for the timeslot to be updated before routing to the
editor page, because otherwise the editor page might redirect back to
the overview because it can’t find the episode for the timeslot.
parent 6f841557
No related branches found
No related tags found
No related merge requests found
Pipeline #8903 passed
Pipeline: aura-tests

#8904

    ......@@ -161,7 +161,8 @@ const hasEnded = computed(() => now.value > end.value)
    const { create: createEpisode, isSaving: isCreatingEpisode } = useCreateBehaviour(
    async function () {
    const episode = await episodeStore.create({ showId: props.timeslot.showId })
    episodeId.value = episode.id
    // We don’t set episodeId.value here, because we need to know when the change has been persisted.
    await timeslotStore.partialUpdate(props.timeslot.id, { episodeId: episode.id })
    await router.push({
    name: 'show-timeslot-details',
    params: { timeslotId: props.timeslot.id },
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment