- Upgraded the MongoDB database schema to improve reliability and structure.
- Renamed the "Org" collection and route handlers to "Teams" for better clarity and consistency.
- Refactored the User struct into two separate entities: Profile and Type.
- The Profile struct now contains all the necessary data for user profiles.
- Introduced a 'Type' field in the profile to store the user's type, including team/athlete ids.
- Replaced the array-based approach for Likes/Followers/Following properties with a single object id.
- Likes/Followers/Following documents now utilize this object id as a 'host' to maintain user-document relationships.
- This enhancement addresses issues with the previous 'unlimited-array' approach, ensuring greater reliability for the collection.
- Addressed typos and improved error messages for better user experience.
- Fixed issues related to data types when saving documents to the database.
- Initially designed as the sole backend for "THE FIELD" project, this Golang project's direction has been adjusted.
- The primary purpose now revolves around authentication management, including SignUp, Login, Sessions, Logout, GetUser, and finishing user profiles.
- Other functionalities and features will be handled by the NextJs API using Prisma.
- Enhanced the responses returned from the
accountHandler
route handler to provide more informative and user-friendly error messages.
- Added the missing field to the
User
struct in theaccountHandler
signup function, ensuring all necessary user data is captured during signup.
- Implemented the
RequestOrg
function to handle specific routes related to organizations.
- Expanded the
User
struct to include additional fields forConversations
,Sports
,Org
, andAthlete
, enabling better user data representation.
- Added several utility functions to the user repository:
Save
: For saving user data.GetById
: For retrieving user data by user ID.GetByEmail
: For fetching user data based on the email address.DeleteOrgById
: For deleting an organization by its ID.
- Added the
request/org/:id
route to handle specific requests related to organizations.