diericx / climbing_notebook

A tool to help climbers with their training
https://climbingnotebook.com
Other
26 stars 2 forks source link

Implement a better system for handling types in API requests #58

Open diericx opened 1 month ago

diericx commented 1 month ago

Right now API requests return json but only (sometimes) define a type for the return body. There should be some system in place where the client can know exactly what the return type will be.

The main issue I ran into here was that I am returning dates in /api/calendar_events. Without proper type casting these dates remain strings and cause issues later on where the client expects them to be date objects.

Or maybe we should be returning dates as int...