json-server
json-server copied to clipboard
`_gte` and `_lte` doesn't work for dates
DB file:
{
"days": [
{
"id": 1,
"date": "2024-03-04T00:00:00",
"hours": 6,
"timeRanges": [
{
"id": 1,
"dayId": 1,
"start": "2024-03-04T08:00:00",
"end": "2024-03-04T12:00:00",
"image": null
},
{
"id": 2,
"dayId": 1,
"start": "2024-03-04T13:00:00",
"end": "2024-03-04T15:00:00",
"image": null
}
]
},
{
"id": 2,
"date": "2024-03-05T00:00:00",
"hours": 8,
"timeRanges": [
{
"id": 3,
"dayId": 2,
"start": "2024-03-05T08:00:00",
"end": "2024-03-05T12:00:00",
"image": null
},
{
"id": 4,
"dayId": 2,
"start": "2024-03-05T13:00:00",
"end": "2024-03-05T17:00:00",
"image": null
}
]
}
]
}
URL: http://localhost:3000/days?date_gte=2024-03-01
Returns an empty array.