mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-22 16:55:36 +02:00
fix movie request page not loading
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import RequestsTable from '$lib/components/season-requests-table.svelte';
|
||||
import { base } from '$app/paths';
|
||||
|
||||
let requests = $state(page.data.requestsData);
|
||||
let requests = page.data.requestsData;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { env } from '$env/dynamic/public';
|
||||
import type { LayoutLoad } from './$types';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
export const load: LayoutLoad = async ({ fetch }) => {
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
try {
|
||||
const requests = await fetch(`${apiUrl}/movies/requests`, {
|
||||
method: 'GET',
|
||||
@@ -11,8 +11,10 @@
|
||||
import type { User } from '$lib/types';
|
||||
|
||||
let currentUser: () => User = getContext('user');
|
||||
let users: User[] = $derived(page.data.users.filter((user: User) => user.id !== currentUser().id));
|
||||
$inspect(users)
|
||||
let users: User[] = $derived(
|
||||
page.data.users.filter((user: User) => user.id !== currentUser().id)
|
||||
);
|
||||
$inspect(users);
|
||||
console.log('Current user:', currentUser());
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user