Open tegandbiscuits opened 5 years ago
What value do you want returned if either of those states aren't true?
Thinking about this a bit, it might be good to just modify the GET /locations
endpoint so it returns something like this.
{
"status": "dead" || "abandoned" || "alive",
"locations": [
{ "lat": "100.0000", "lon": "100.0000", "published_at": "..." } // + other things
]
}
It might not be the most semantic, but it would let us figure the status, and where it was.
Arguably this could also just be figured on the front end as well.
Yeah, I like that better. Probably better off as one endpoint. I think the logic based on location will be advanced enough to keep it on the backend.
How large do you think the move radius should be?
Pretty arbitrary but maybe ~2-8km (geolib uses SI)?
I think 2km would be pretty safe, so it'd probably just go with that, at least to get the logic in.
The status should be
I'm thinking both times could be the same. Maybe 8, 12, or 24 hours.