fixed by lint

This commit is contained in:
Jean Jacques Avril 2025-03-02 17:15:57 +00:00
parent 86d26a1e41
commit b53c186342
9 changed files with 10 additions and 10 deletions

View File

@ -86,7 +86,7 @@ export async function POST(request: NextRequest) {
const body = await request.json();
// Check for admin auth
const { password, } = body;
let isAuthenticated = await checkAdminAuth(password);
const isAuthenticated = await checkAdminAuth(password);
if (!isAuthenticated) {
return NextResponse.json(
{ error: 'Unauthorized' },

View File

@ -6,7 +6,7 @@ export async function POST(request: NextRequest) {
const body = await request.json();
// Check for admin auth
const { password } = body;
let isAuthenticated = await checkAdminAuth(password);
const isAuthenticated = await checkAdminAuth(password);
if (!isAuthenticated) {
return NextResponse.json(
{ error: 'Unauthorized' },

View File

@ -9,7 +9,7 @@ export async function POST(request: NextRequest) {
const body = await request.json();
// Check for admin auth
const { password } = body;
let isAuthenticated = await checkAdminAuth(password);
const isAuthenticated = await checkAdminAuth(password);
if (!isAuthenticated) {
return NextResponse.json(
{ error: 'Unauthorized' },

View File

@ -5,7 +5,7 @@ import { NextRequest, NextResponse } from 'next/server';
export async function GET(request: NextRequest) {
try {
// Check for admin auth
let isAuthenticated = await checkAdminAuth();
const isAuthenticated = await checkAdminAuth();
if (!isAuthenticated) {
return NextResponse.json(
{ error: 'Unauthorized' },
@ -36,7 +36,7 @@ export async function POST(request: NextRequest) {
const body = await request.json();
// Check for admin auth
const { password } = body;
let isAuthenticated = await checkAdminAuth(password);
const isAuthenticated = await checkAdminAuth(password);
if (!isAuthenticated) {
return NextResponse.json(
{ error: 'Unauthorized' },

View File

@ -9,7 +9,7 @@ export async function POST(request: NextRequest) {
const body = await request.json();
// Check for admin auth
const { password } = body;
let isAuthenticated = await checkAdminAuth(password);
const isAuthenticated = await checkAdminAuth(password);
if (!isAuthenticated) {
return NextResponse.json(
{ error: 'Unauthorized' },

View File

@ -9,7 +9,7 @@ export async function POST(request: NextRequest) {
const { password } = body;
// Check for admin auth
let isAuthenticated = await checkAdminAuth(password);
const isAuthenticated = await checkAdminAuth(password);
if (!isAuthenticated) {
return NextResponse.json(
{ error: 'Unauthorized' },

View File

@ -7,7 +7,7 @@ export async function POST(request: NextRequest) {
const body = await request.json();
// Check for admin auth
const { password } = body;
let isAuthenticated = await checkAdminAuth(password);
const isAuthenticated = await checkAdminAuth(password);
if (!isAuthenticated) {
return NextResponse.json(
{ error: 'Unauthorized' },

View File

@ -7,7 +7,7 @@ export async function POST(request: NextRequest) {
const body = await request.json();
const { password } = body;
// Check for admin auth
let isAuthenticated = await checkAdminAuth(password);
const isAuthenticated = await checkAdminAuth(password);
if (!isAuthenticated) {
return NextResponse.json(
{ error: 'Unauthorized' },

View File

@ -77,7 +77,7 @@ async function verifyAdminToken(): Promise<boolean> {
export async function checkAdminAuth(password?: string): Promise<boolean> {
// Get admin password from environment variable or use default for development
let isAuthenticated = await verifyAdminToken();
const isAuthenticated = await verifyAdminToken();
if (isAuthenticated) return true;
if (password) {
const ADMIN_PASSWORD = process.env.ADMIN_PASSWORD || 'schafwaschener-segelverein-admin';