wip: trpc

This commit is contained in:
Andras Bacsai
2022-12-13 12:54:57 +01:00
parent 1180d3fdde
commit abc614ecfd
15 changed files with 44 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
import { error } from '@sveltejs/kit';
import { t } from '$lib/store';
import { trpc } from '$lib/store';
import type { LayoutLoad } from './$types';
import { redirect } from '@sveltejs/kit';
import Cookies from 'js-cookie';
@@ -7,7 +7,7 @@ export const ssr = false;
export const load: LayoutLoad = async ({ url }) => {
try {
return await t.dashboard.resources.query();
return await trpc.dashboard.resources.query();
} catch (err) {
throw error(500, {
message: 'An unexpected error occurred, please try again later.'