refactoring part 1: camelcase naming, token vs pw naming

This commit is contained in:
2025-07-16 09:39:02 +02:00
parent b8e5031669
commit 34d5034a71
9 changed files with 96 additions and 91 deletions

View File

@@ -1,4 +1,4 @@
import { getVorgang, getVorgangByCaseId } from '$lib/server/vorgangService';
import { getVorgangByToken, getVorgangByCaseId } from '$lib/server/vorgangService';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ params, url }) => {
@@ -6,7 +6,7 @@ export const load: PageServerLoad = async ({ params, url }) => {
const caseToken = url.searchParams.get('token');
const crimesList = await getVorgangByCaseId(caseId);
const vorg = getVorgang(caseId);
const vorg = getVorgangByToken(caseId);
return {
crimesList,

View File

@@ -143,7 +143,7 @@
<div class="flex flex-col items-center justify-center w-full">
<h1 class="text-xl">Vorgang {vorg.name}</h1>
{#if data?.user?.admin}
Zugangscode: {vorg.pw}
Zugangspasswort: {vorg.pw}
<Button on:click={() => setClipboard($page.url.toString().split('?')[0])}>Copy Link</Button>
{/if}
</div>