PMPR-44 : fix formatting
Check Deno code / Check Deno code (pull_request) Failing after 6s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Successful in 1m13s

This commit is contained in:
Clément Oudelet
2026-04-26 23:28:50 +02:00
parent a1c15185d6
commit 383bebb3e7
+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;