PMPR-44 : fix formatting

This commit is contained in:
Clément Oudelet
2026-04-26 23:28:50 +02:00
committed by djalim
parent 6c602cb10a
commit 720a380be8
+5 -2
View File
@@ -5,7 +5,7 @@ import { db } from "../../../../../databases/db.ts";
import { notes } from "../../../../../databases/schema.ts";
export const handler: Handlers = {
// # 44 POST /notes/import-xlsx
//# 44 POST /notes/import-xlsx
async POST(request) {
try {
const formData = await request.formData();
@@ -23,7 +23,10 @@ export const handler: Handlers = {
const buffer = await file.arrayBuffer();
const workbook = XLSX.read(buffer);
const sheet = workbook.Sheets[workbook.SheetNames[0]];
const rows = XLSX.utils.sheet_to_json(sheet) as { numEtud: number; note: number }[];
const rows = XLSX.utils.sheet_to_json(sheet) as {
numEtud: number;
note: number;
}[];
for (const row of rows) {
const { numEtud, note } = row;