siggame / coliselia

Common components & services between ophelia and colisee; note: repo name subject to change
3 stars 1 forks source link

Schedule router #20

Closed user404d closed 7 years ago

user404d commented 7 years ago

Schedule router implementation for dbapi.

user404d commented 7 years ago

It should be mentioned that for the created_time and modified_time query parameters it is expected that they are arrays in the query (e.g. siggame/api/v2/schedule/?created_time[]=&created_time[]=now() will become {created_time : [null, 'now()']} in the req object). The behavior in that situation is that the sql query will become select * from schedule where created_time between '-infinity' and 'now()'.

russleyshaw commented 7 years ago

I really dont like that created time syntax, its not standard

Typically, in query parameters, if you want ?created_time to be an array, you have ?created_time=1&created_time=2. If you feel strongly about this syntax, feel free to defend it, but I think having distinct min_created_time and max_created_time is significantly more clear as to what the API is going to do

user404d commented 7 years ago

The created_time[] is not necessary (I thought it was, but then again it was late).