fix: updated from 9.3.3 to 15
This commit is contained in:
@@ -43,7 +43,7 @@ export async function GET(request: Request) {
|
||||
const rows = await query(sql);
|
||||
|
||||
// Transform to proper structure
|
||||
const drivers: DriverWithServer[] = rows.map((row: any) => ({
|
||||
const drivers: DriverWithServer[] = rows.map((row: unkown) => ({
|
||||
driver_guid: row.driver_guid,
|
||||
driver_name: row.driver_name,
|
||||
driver_team: row.driver_team,
|
||||
@@ -85,24 +85,3 @@ export async function GET(request: Request) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// POST endpoint for updating driver data (optional, for future use)
|
||||
export async function POST(request: Request) {
|
||||
try {
|
||||
const body = await request.json();
|
||||
|
||||
// Add your update logic here
|
||||
// Example: Update driver rank, stats, etc.
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
message: 'Driver updated',
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Error updating driver:', error);
|
||||
return NextResponse.json(
|
||||
{ success: false, error: 'Failed to update driver' },
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user