mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-11-04 08:10:28 +09:00
사소한 리팩토링 2
This commit is contained in:
1 parent
d94d14cf83
commit
c9d4b10356
16 files changed
+54
-84
No files matched your search
@@ -1,14 +1,13 @@
|
||||
import { error } from "@sveltejs/kit";
|
||||
import { useTRPC } from "$trpc/client";
|
||||
import { trpc } from "$trpc/client";
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
const trpc = useTRPC(fetch);
|
||||
|
||||
try {
|
||||
const files = await trpc.file.listWithoutThumbnail.query();
|
||||
const files = await trpc(fetch).file.listWithoutThumbnail.query();
|
||||
return { files };
|
||||
} catch {
|
||||
// TODO: Error Handling
|
||||
error(500, "Internal server error");
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user