testing yuk
This commit is contained in:
@@ -25,10 +25,10 @@ export async function GET() {
|
||||
);
|
||||
}
|
||||
|
||||
// Get unique tahun_angkatan values and limit to 7 most recent
|
||||
// Ambil nilai tahun_angkatan unik dan batasi 7 tahun terbaru
|
||||
const uniqueYears = [...new Set(data.map(item => item.tahun_angkatan))]
|
||||
.sort((a, b) => b - a) // Sort descending
|
||||
.slice(0, 7); // Take only 7 most recent years
|
||||
.sort((a, b) => b - a) // Urutkan descending
|
||||
.slice(0, 7); // Ambil hanya 7 tahun terbaru
|
||||
|
||||
return NextResponse.json(uniqueYears, {
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user