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';
@@ -27,7 +27,7 @@ export const load: LayoutLoad = async ({ params, url }) => {
const { pathname } = new URL(url);
const { id } = params;
try {
const application = await t.applications.getApplicationById.query({ id });
const application = await trpc.applications.getApplicationById.query({ id });
if (!application) {
throw redirect(307, '/applications');
}