Revert "testing: display path availability on screen"
This reverts commit 59585e26f1.
This commit is contained in:
@@ -5,14 +5,11 @@ import { ROUTE_NAMES } from '..';
|
|||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
const path = '/daten';
|
const path = '/daten';
|
||||||
let path_existing: string;
|
|
||||||
|
|
||||||
fs.access(path, fs.constants.F_OK, (err) => {
|
fs.access(path, fs.constants.F_OK, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
path_existing = "NO";
|
|
||||||
console.error(`❌ Directory "${path}" does NOT exist or is not accessible.`);
|
console.error(`❌ Directory "${path}" does NOT exist or is not accessible.`);
|
||||||
} else {
|
} else {
|
||||||
path_existing = "YES";
|
|
||||||
console.log(`✅ Directory "${path}" exists and is accessible.`);
|
console.log(`✅ Directory "${path}" exists and is accessible.`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -21,7 +18,6 @@ export const load: PageServerLoad = (event: ServerLoadEvent) => {
|
|||||||
if (!event.locals.user && event.url.pathname !== ROUTE_NAMES.ANMELDUNG)
|
if (!event.locals.user && event.url.pathname !== ROUTE_NAMES.ANMELDUNG)
|
||||||
throw redirect(303, ROUTE_NAMES.ANMELDUNG);
|
throw redirect(303, ROUTE_NAMES.ANMELDUNG);
|
||||||
return {
|
return {
|
||||||
user: event.locals.user,
|
user: event.locals.user
|
||||||
path_existing
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
class=" inset-x-0 top-0 -z-10 h-full flex items-center justify-center bg-white shadow-lg ring-1 ring-gray-900/5"
|
class=" inset-x-0 top-0 -z-10 h-full flex items-center justify-center bg-white shadow-lg ring-1 ring-gray-900/5"
|
||||||
><h1>{data.path_existing}</h1>
|
>
|
||||||
<div class="mx-auto flex justify-center max-w-7xl py-10 px-8 w-full">
|
<div class="mx-auto flex justify-center max-w-7xl py-10 px-8 w-full">
|
||||||
{#if data.user.admin}
|
{#if data.user.admin}
|
||||||
<div class="group relative rounded-lg p-6 text-sm leading-6 hover:bg-gray-50 w-1/4">
|
<div class="group relative rounded-lg p-6 text-sm leading-6 hover:bg-gray-50 w-1/4">
|
||||||
|
|||||||
Reference in New Issue
Block a user