style: clean up code formatting and remove trailing whitespace

refactor: reorganize imports and fix type imports
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-11 03:08:36 -03:00
1 parent d3704602fd
commit 47c04de6fe
232 files changed
+7140 -4798

No files matched your search

+8 -9
View File
@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from "next/server";
import { secureLogger } from "@/lib/secure-logger";
import { type NextRequest, NextResponse } from "next/server";
import { requireAuth } from "@/lib/auth/middleware";
import { markAsRead } from "@/lib/prisma/queries/notifications";
import { secureLogger } from "@/lib/secure-logger";
/**
* POST /api/notifications/[id]/read
@@ -9,7 +9,7 @@ import { markAsRead } from "@/lib/prisma/queries/notifications";
*/
export async function POST(
request: NextRequest,
{ params }: { params: Promise<{ id: string }> }
{ params }: { params: Promise<{ id: string }> },
) {
try {
const authResult = await requireAuth(request);
@@ -18,10 +18,10 @@ export async function POST(
const { id } = await params;
const notificationId = parseInt(id, 10);
if (isNaN(notificationId)) {
if (Number.isNaN(notificationId)) {
return NextResponse.json(
{ success: false, error: "ID de notificação inválido" },
{ status: 400 }
{ status: 400 },
);
}
@@ -30,7 +30,7 @@ export async function POST(
if (!success) {
return NextResponse.json(
{ success: false, error: "Notificação não encontrada ou já está lida" },
{ status: 404 }
{ status: 404 },
);
}
@@ -39,7 +39,7 @@ export async function POST(
success: true,
message: "Notificação marcada como lida",
},
{ status: 200 }
{ status: 200 },
);
} catch (error) {
secureLogger.error("❌ Erro ao marcar notificação como lida", {
@@ -48,8 +48,7 @@ export async function POST(
return NextResponse.json(
{ success: false, error: "Erro ao marcar notificação como lida" },
{ status: 500 }
{ status: 500 },
);
}
}