Skip to content

Commit

Permalink
Split date and time
Browse files Browse the repository at this point in the history
  • Loading branch information
Daiki Narimoto committed Jan 24, 2025
1 parent 7c16f27 commit caf3adf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/routes/invoices.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,19 @@ invoicesRouter.get("/event/:event_id", async (req, res) => {
const params = [event_id];

if (start) {
const [startDate, startTime] = start.split("T");

Check warning on line 47 in server/routes/invoices.js

View workflow job for this annotation

GitHub Actions / run-checks

'startTime' is assigned a value but never used. Allowed unused vars must match /^_/u
query += ` AND (start_date >= $2)`;
params.push(start);
params.push(startDate);
}

if (end) {
const [endDate, endTime] = end.split("T");

Check warning on line 53 in server/routes/invoices.js

View workflow job for this annotation

GitHub Actions / run-checks

'endTime' is assigned a value but never used. Allowed unused vars must match /^_/u
if (params.length === 1) {
query += ` AND (end_date <= $2)`;
} else {
query += ` AND (end_date <= $3)`;
}
params.push(end);
params.push(endDate);
}

const data = await db.query(query, params);
Expand Down

0 comments on commit caf3adf

Please sign in to comment.