You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(api): handle DateTime deserialization from database for User model
Anonymous user creation was failing with a type cast error because the `postgres` driver returns native `DateTime` objects, while the `User.fromJson` factory expects ISO 8601 strings for date fields.
This change introduces a custom deserialization function for the `userRepository`. This function intercepts the data map from the database, converts `DateTime` objects to the expected string format, and then passes the corrected map to the standard `User.fromJson` factory. This resolves the runtime error by aligning the data format from the data source with the expectations of the data model.
0 commit comments