refactor: extract signals filter builder, add ESLint 10 config, fix low-hanging issues

This commit is contained in:
Sebastian Seedorf
2026-06-04 14:09:12 +02:00
parent cf9bb33ecb
commit 4b05f2968e
34 changed files with 2145 additions and 188 deletions

View File

@@ -1,6 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';
import pool from '@/lib/db';
import { type NextRequest, NextResponse } from 'next/server';
import { withAuth } from '@/lib/apiHelpers';
import pool from '@/lib/db';
export const PUT = withAuth(async (req: NextRequest, { params }) => {
const { id } = await params;

View File

@@ -1,9 +1,11 @@
import { NextResponse } from 'next/server';
import pool from '@/lib/db';
import type { AlertConfig, TriggeredAlert } from '@/lib/types';
import { withAuth } from '@/lib/apiHelpers';
import pool from '@/lib/db';
import { getServerLocaleMap } from '@/lib/localeServer';
import { resolveName } from '@/lib/localization';
import type { AlertConfig, TriggeredAlert } from '@/lib/types';
export const GET = withAuth(async () => {
const alertsResult = await pool.query<AlertConfig>(

View File

@@ -1,6 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';
import pool from '@/lib/db';
import { type NextRequest, NextResponse } from 'next/server';
import { withAuth } from '@/lib/apiHelpers';
import pool from '@/lib/db';
export const GET = withAuth(async () => {
const result = await pool.query('SELECT * FROM alerts ORDER BY created_at DESC');