Skip to content

Commit

Permalink
Require login for CSV import page
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn committed Mar 31, 2024
1 parent a1c15d4 commit 49fa550
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frontend/src/routes/flights/import/csv/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<script lang="ts">
import {onMount} from 'svelte';
import {requireLogin} from '$lib/auth';
import Flashes from '$lib/components/Flashes.svelte';
import MessageModal from '$lib/components/MessageModal.svelte';
import {formatDateTime} from '$lib/formatters';
import {loginState} from '$lib/stores';
import {SubmitError, type SubmitErrorData} from '../../api';
Expand Down Expand Up @@ -76,6 +80,10 @@
$: hasFile = (files?.length ?? 0) > 0;
$: fileName = files?.[0].name ?? 'No file selected…';
onMount(() => {
requireLogin($loginState, '/flights/import/csv/');
});
</script>

<nav class="breadcrumb" aria-label="breadcrumbs">
Expand Down

0 comments on commit 49fa550

Please sign in to comment.