fix: change Map instantiation type definition in batch-save route

This commit is contained in:
Luis Gabriel Ramos Robles 2026-06-11 22:35:27 +00:00
parent a7cfa1a951
commit d5a09e14a4

View file

@ -63,8 +63,8 @@ export async function POST(req: NextRequest) {
where: { code: { in: uniqueHotelCodes } }
});
const userMap = new Map(dbUsers.map((u: any) => [u.username, u]));
const hotelMap = new Map(dbHotels.map((h: any) => [h.code, h]));
const userMap = new Map<string, any>(dbUsers.map((u: any) => [u.username, u]));
const hotelMap = new Map<string, any>(dbHotels.map((h: any) => [h.code, h]));
// 3. Save records
const createdSales = [];