mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-29 20:52:10 +00:00
wip: trpc
This commit is contained in:
16
apps/client/src/routes/services/[id]/secrets/+page.ts
Normal file
16
apps/client/src/routes/services/[id]/secrets/+page.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { trpc } from '$lib/store';
|
||||
import type { PageLoad } from './$types';
|
||||
export const ssr = false;
|
||||
|
||||
export const load: PageLoad = async ({ params }) => {
|
||||
try {
|
||||
const { id } = params;
|
||||
const { data } = await trpc.services.getSecrets.query({ id });
|
||||
return data;
|
||||
} catch (err) {
|
||||
throw error(500, {
|
||||
message: 'An unexpected error occurred, please try again later.'
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user