Closed trouni closed 3 years ago
I signed up for a new account to test it. I'm getting 0 points but it looks like if i don't have a prediction, it's giving me a "draw" for the matches which have already been completed
Right I went to fast on that case statement. I'll fix it.
Should be fixed!
⚠️ Please test on your end, I have only done minimal manual testing. ⚠️
Should work now. Postman gives me 30-50ms response time locally, compared to 2-2.5s 😅
The SQL query returns a flat hash... Ideally, we would have worked with that hash directly in the FE, but since I didn't want to break or refactor anything from the Vue app, I've rewritten the json view from the API to match exactly what we had before. It sucks a bit because we can't make use of the partials anymore, but I think that's the safest for now.
Among the optional refactors that I would see after the competition is over:
choice
is now being read directly from the database, which returns an integer. I personally now always default my enums to strings instead of integers, which would be the more robust thing to do (instead of the current conditional), but it requires migrating the DB, which I think is too risky while the competition is live and people are making predictions.