remove unused locals parameter

This commit is contained in:
2025-11-05 09:18:05 +01:00
parent fd907c9851
commit 808b56934c
5 changed files with 9 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
import { getVorgaenge } from '$lib/server/vorgangService';
import { json } from '@sveltejs/kit';
export async function GET({ locals }) {
export async function GET() {
const vorgaenge = getVorgaenge();
return new Response(JSON.stringify(vorgaenge), {

View File

@@ -6,7 +6,7 @@ import {
vorgangNameExists
} from '$lib/server/vorgangService';
export async function DELETE({ locals, params }) {
export async function DELETE({ params }) {
const vorgangToken = params.vorgang;
const object_list = await new Promise((resolve, reject) => {
@@ -30,7 +30,7 @@ export async function DELETE({ locals, params }) {
return new Response(null, { status: 204 });
}
export async function HEAD({ locals, params }) {
export async function HEAD({ params }) {
try {
const vorgangName = params.vorgang;
const existing = vorgangNameExists(vorgangName);
@@ -44,7 +44,7 @@ export async function HEAD({ locals, params }) {
}
}
export async function GET({ params, locals }) {
export async function GET({ params }) {
try {
const vorgangToken = params.vorgang;
const crimesList = await getCrimesListByToken(vorgangToken);

View File

@@ -1,7 +1,7 @@
import { BUCKET, client } from '$lib/minio';
import { json } from '@sveltejs/kit';
export async function GET({ locals }) {
export async function GET() {
const stream = client.listObjectsV2(BUCKET, '', true);
const result = new ReadableStream({
start(controller) {
@@ -24,7 +24,7 @@ export async function GET({ locals }) {
});
}
export async function DELETE({ locals, request }) {
export async function DELETE({ request }) {
const url_fragments = request.url.split('/');
const item = url_fragments.at(-1);
const vorgang = url_fragments.at(-2);

View File

@@ -4,14 +4,14 @@ import bcrypt from 'bcrypt';
const saltRounds = 12;
export function GET({ locals }) {
export function GET() {
const userList = getUsers();
return new Response(JSON.stringify(userList));
}
export async function POST({ request, locals }) {
export async function POST({ request }) {
const data = await request.json();
const userName = data.userName;
const userPassword = data.userPassword;

View File

@@ -1,7 +1,7 @@
import { json } from '@sveltejs/kit';
import { deleteUser } from '$lib/server/userService';
export async function DELETE({ params, locals }) {
export async function DELETE({ params }) {
const userId = params.user;
const rowCount = deleteUser(userId);