feat: implement PR #20 review feedback

- Add eslint-plugin-react-hooks dependency to fix ESLint errors
- Fix unused sentimentThreshold variable in settings route
- Add comprehensive dark mode accessibility tests as requested
- Implement custom error classes for better error handling
- Create centralized error handling system with proper typing
- Add dark mode contrast and focus indicator tests
- Extend accessibility test coverage for theme switching
This commit is contained in:
2025-06-29 06:10:07 +02:00
parent 86498ec0df
commit 831f344361
5 changed files with 463 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from "next/server";
import { type NextRequest, NextResponse } from "next/server";
import { getServerSession } from "next-auth";
import { prisma } from "../../../../lib/prisma";
import { authOptions } from "../../../../lib/auth";
import { prisma } from "../../../../lib/prisma";
export async function POST(request: NextRequest) {
const session = await getServerSession(authOptions);
@ -18,7 +18,7 @@ export async function POST(request: NextRequest) {
}
const body = await request.json();
const { csvUrl, csvUsername, csvPassword, sentimentThreshold } = body;
const { csvUrl, csvUsername, csvPassword } = body;
await prisma.company.update({
where: { id: user.companyId },