Akenefick
2 years agoGenius
Passing post_time Date Constraint in JSON
I have done this successfully in a regular LiQL call but no matter what I try when doing this with JSON I get an error like this:
An invalid value was passed for the constraint 'post_time' (on the object 'messages'): The value should be a date, but is '2023-10-01T10:04:30-08:00'.
Here is my JSON constraint which is then stringified and the API call is made with JavaScript.
"constraints": [
{
"board.id": boardId,
"depth":0,
"post_time": {
">=": "2023-10-01T10:04:30-08:00"
}
},
{
"depth":0,
"post_time": {
"<=": "2023-11-15T10:04:30-08:00"
}
}
]
Please Help!