Compare commits
No commits in common. "bfc07fcde5173eaa70f3c132bc79077c861ce8bc" and "1eeecbf275b23333ba76421077b095e5a75c5a89" have entirely different histories.
bfc07fcde5
...
1eeecbf275
@ -171,14 +171,12 @@ export async function GET(request: NextRequest) {
|
||||
|
||||
if (dateFrom || dateTo) {
|
||||
if (dateFrom) {
|
||||
// Cast param to DATE to avoid "operator does not exist: date >= text" in Postgres
|
||||
whereConditions.push(`date_taken >= $${paramIndex}::date`);
|
||||
whereConditions.push(`date_taken >= $${paramIndex}`);
|
||||
params.push(dateFrom);
|
||||
paramIndex++;
|
||||
}
|
||||
if (dateTo) {
|
||||
// Cast param to DATE to avoid "operator does not exist: date <= text" in Postgres
|
||||
whereConditions.push(`date_taken <= $${paramIndex}::date`);
|
||||
whereConditions.push(`date_taken <= $${paramIndex}`);
|
||||
params.push(dateTo);
|
||||
paramIndex++;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user