Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Siilwyn committed Jul 31, 2024
1 parent 9dcb9f5 commit d71e4d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/api/consume-opening-hours.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export default defineEventHandler(async (event) => {
),
);

console.log(JSON.stringify({buildingsOpeningDates}, null, 2))
const { error } = await client.from('buildings').upsert(
// @ts-expect-error
buildingsOpeningDates.map((building) => ({
Expand All @@ -120,6 +121,7 @@ export default defineEventHandler(async (event) => {
return event.node.res.end();
}

console.info(`Consumed opening hours of ${buildingsOpeningDates.length} buildings`);
event.node.res.statusCode = 202;
event.node.res.end();
});

0 comments on commit d71e4d5

Please sign in to comment.