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): correctly serialize and deserialize user content preferences
User creation was failing with a type cast error when creating the default UserContentPreferences. This was caused by two issues:
1. Complex list objects were not being JSON-encoded before being sent to the database's JSONB columns.
2. DateTime objects returned from the database were not being converted to strings before being passed to the fromJson factory.
This change introduces custom toJson and fromJson functions for the userContentPreferencesRepository. These functions handle the necessary data transformations, ensuring correct serialization and deserialization and resolving the runtime error.
0 commit comments