fixed some error from merge request
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { decryptToken } from '$lib/auth';
|
||||
import type { Handle } from '@sveltejs/kit';
|
||||
|
||||
export const handle: Handle = ({ event, resolve }) => {
|
||||
export const handle: Handle = async ({ event, resolve }) => {
|
||||
const jwt = event.cookies.get('session');
|
||||
try {
|
||||
if (jwt) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import Chevron from '$lib/icons/Chevron-right.svelte';
|
||||
import Profile from '$lib/icons/Profile.svelte';
|
||||
|
||||
export let data;
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script lang="ts">
|
||||
import AddProcess from '$lib/icons/Add-Process.svelte';
|
||||
import FileRect from '$lib/icons/File-rect.svelte';
|
||||
import ListIcon from '$lib/icons/List-icon.svelte';
|
||||
|
||||
|
||||
export let data;
|
||||
export let outline = true;
|
||||
@@ -27,33 +28,6 @@
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
<!--{#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="flex h-11 w-11 items-center justify-center rounded-lg bg-gray-50 group-hover:bg-white"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="w-6 h-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<a href="/tatorte" class="mt-6 block font-semibold text-gray-900">
|
||||
Neueer Vorgang
|
||||
<span class="absolute inset-0"></span>
|
||||
</a>
|
||||
<p class="mt-1 text-gray-600">Stelle einen weiteren Tatort für die Anwendung bereit.</p>
|
||||
</div>
|
||||
{/if}-->
|
||||
{#if data.user.admin}
|
||||
<div class="group relative rounded-lg p-6 text-sm leading-6 hover:bg-gray-50 w-1/4">
|
||||
<div
|
||||
|
||||
@@ -32,22 +32,15 @@
|
||||
|
||||
async function delete_item(ev: Event) {
|
||||
let delete_item = window.confirm('Bist du sicher?');
|
||||
let delete_item = window.confirm('Bist du sicher?');
|
||||
|
||||
if (delete_item) {
|
||||
const target = ev.currentTarget as HTMLElement | null;
|
||||
if (!target) return;
|
||||
let filename = target.id.split('del__')[1];
|
||||
const target = ev.currentTarget as HTMLElement | null;
|
||||
if (!target) return;
|
||||
let filename = target.id.split('del__')[1];
|
||||
|
||||
// delete request
|
||||
// --------------
|
||||
// delete request
|
||||
// --------------
|
||||
|
||||
let url = `/api/list/${filename}`;
|
||||
let url = `/api/list/${filename}`;
|
||||
|
||||
try {
|
||||
@@ -108,9 +101,3 @@
|
||||
min-width: 24rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
ul {
|
||||
min-width: 24rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { client } from '$lib/minio';
|
||||
import { Readable } from 'stream';
|
||||
import { Buffer } from 'buffer';
|
||||
|
||||
/** @type {import('./$types').RequestHandler} */
|
||||
export async function GET({ params }) {
|
||||
Reference in New Issue
Block a user