Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New User Management #35

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

New User Management #35

wants to merge 13 commits into from

Conversation

anantduggal
Copy link
Collaborator

Notion ticket link

New User Storage

Implementation description

  • Adjusted Auth.ts code to add the User when they sign in.
  • Added a new Table for Accounts to hold the account information -- leaves room for the future if we want to also add Sessions & Tokens
  • Added default values to the users -> auto-roled as a "Teacher", default status is "Invited" & default numofAbsences are "10"

Steps to test

  1. Run Docker -- self-explanatory
  2. On localhost:3000, sign in with Google & log in with any account (no restrictions currently set)
  3. Create a new Terminal (aside from the Docker one), and run the following commands:
    docker exec -it sistema-db-1 psql -U sistema -d sistema
    SELECT * FROM public."User";
    Ensure your account comes up on the bottom & all columns are filled.

From there, verify that Accounts are also filled. Run SELECT * FROM public."Account";
Ensure your account is filled & all columns are filled.

What should reviewers focus on?

  • Ensure the the users are added to BOTH "User" table and "Account" table
  • Ensure that you can get to the homepage
  • Ensure no errors persist on Docker

Checklist

  • [ X] My PR name is descriptive and in imperative tense
  • [ X] My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • [X ] I have run the appropriate linter(s)
  • [ X] I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sistema ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 2:21am

auth.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
auth.ts Outdated Show resolved Hide resolved
auth.ts Outdated Show resolved Hide resolved
auth.ts Outdated Show resolved Hide resolved
auth.ts Outdated Show resolved Hide resolved
@ChinemeremChigbo
Copy link
Member

Please fix the failing vercel deployment. Seems to be a formatting issue. Run npm run format to figure out where the problem is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants