PMPR-44 : fix formatting
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user