bluewave-labs / bluewave-dataroom

The open source DocSend alternative
https://bluewavelabs.ca
GNU Affero General Public License v3.0
6 stars 6 forks source link

Add Register Functionality and Code Refactoring. #59

Closed SajanGhuman closed 3 weeks ago

SajanGhuman commented 4 weeks ago

This PR adds register functionality to the app. There is also some code refactoring and optimizations.

Implemented • Register Functionality

• Optimize "prisma.ts". Change ID (which is a field of User, ArchiveUser and PasswordResetToken Tables) type from "BIGINT" to "INT". The reason being that when type is "BIGINT", there is a need to always serialize ID field and convert it into string as PostgresSQL does not work well with "BIGINT".

• Changes in "api/auth/[...nextauth]/route.ts". The current user_id was not passed properly to the current session (Cannot access user_id in app). It is now fixed.

• Add types for bcrypt NPM library.

• Prisma auto-generates random user_id.