margyle / decaf

Decaf: Does Every Coffee Action, Friend
26 stars 10 forks source link

Add type annotations to route parameters #15

Closed jjok closed 5 years ago

jjok commented 5 years ago

This should mean that you don't need to cast the parameters to the correct type when you use them.

jjok commented 5 years ago

Maybe ignore this until I've checked it actually works. :flushed:

jjok commented 5 years ago

OK. The only thing that didn't work as expected was requiring timeOn to be a float. It meant you have to actually have 1.0 in the URL. As we're potentially refactoring that endpoint anything (as per #2), I thought it would be easier to just revert that change for now, as it probably won't be relevant later.