testing yuk

This commit is contained in:
Randa Firman Putra
2025-09-14 16:59:31 +07:00
parent 248fed0d0b
commit 60211ae829
63 changed files with 315 additions and 315 deletions

View File

@@ -28,7 +28,7 @@ export async function GET() {
);
}
// Group by tahun_angkatan and calculate average IPK
// Kelompokkan berdasarkan tahun_angkatan dan hitung rata-rata IPK
const groupedData = data.reduce((acc, item) => {
const tahun = item.tahun_angkatan;
if (!acc[tahun]) {
@@ -39,7 +39,7 @@ export async function GET() {
return acc;
}, {} as Record<number, { sum: number; count: number }>);
// Convert to final format
// Konversi ke format akhir
const results: IPKData[] = Object.entries(groupedData).map(([tahun, data]) => ({
tahun_angkatan: parseInt(tahun),
rata_rata_ipk: Math.round((data.sum / data.count) * 100) / 100