package
1.6.1
Repository: https://github.com/projeto-uspy/uspy-backend.git
Documentation: pkg.go.dev

# Functions

ChangePassword changes the user's password in the database This method requires the user to be logged in.
CompleteSignup performs the server-side signup operations that can only be done after the user is created.
Delete deletes the given user (removing all of its traces (grades, reviews, etc)) This function wraps the document lookups and simply performs the necessary database operations.
GetMajors retrieves the majors from a given user.
GetTranscriptYears retrieves the last few years a user's has been in USP.
InsertUser takes the user object and their transcripts and performs all the required database insertions.
Login performs the user login by comparing the passwordHash and the stored hash.
Logout is a dummy method that simply calls the view method that will unset the access token cookie.
PreSignup performs the server-side signup operations that can be done before the user is created.
Profile retrieves the user profile from the database.
RequestPasswordReset send a password reset link to the requested email.
ResetPassword resets the user's password in the database It differs from ChangePassword because it does not requires an access token.
SearchCurriculum queries the user's given major subjects and returns which ones they have completed and if so, their record information (grade, status and frequency).
SearchTranscript takes a transcript query and retrieves its records with subject data attached to them.
Update updates a user's profile with a new grade transcript.
UpdateUser takes a new transcript and updates the user stored data It does a diff operation on the already stored grade transcript, adding new final scores to the user's data and updating subject records.
VerifyAccount sets the user's email as verified.
VerifyEmail sends a new verification email.