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

+9 -10
View File
@@ -1,22 +1,22 @@
import { NextRequest, NextResponse } from "next/server";
import { secureLogger } from "@/lib/secure-logger";
import { type NextRequest, NextResponse } from "next/server";
import { getUserById } from "@/lib/prisma/queries/users";
import { secureLogger } from "@/lib/secure-logger";
export async function GET(
request: NextRequest,
{ params }: { params: Promise<{ id: string }> }
_request: NextRequest,
{ params }: { params: Promise<{ id: string }> },
) {
try {
const { id } = await params;
const userId = parseInt(id, 10);
if (isNaN(userId)) {
if (Number.isNaN(userId)) {
return NextResponse.json(
{
success: false,
error: "ID de usuário inválido",
},
{ status: 400 }
{ status: 400 },
);
}
@@ -28,7 +28,7 @@ export async function GET(
success: false,
error: "Usuário não encontrado",
},
{ status: 404 }
{ status: 404 },
);
}
@@ -46,7 +46,7 @@ export async function GET(
createdAt: user.created_at,
},
},
{ status: 200 }
{ status: 200 },
);
} catch (error) {
secureLogger.error("❌ Erro ao buscar perfil público", {
@@ -60,8 +60,7 @@ export async function GET(
success: false,
error: error instanceof Error ? error.message : "Erro interno",
},
{ status: 500 }
{ status: 500 },
);
}
}