ISB3DPRINTERS / teachers-console

Admin console for the teachers
3 stars 1 forks source link

Adding users/passwords to the Postgres #5

Open ravinder-Olivier opened 11 months ago

ravinder-Olivier commented 11 months ago

The method used in the example script provided doesn't work ._.

ravinder-Olivier commented 11 months ago

@RedstoneWizard08

RedstoneWizard08 commented 11 months ago

I'll take a look soon, sorry I've been busy

ravinder-Olivier commented 11 months ago

Yeah, no rush, just wanted to have it documented. I'm working on making a full project roadmap

RedstoneWizard08 commented 11 months ago

I think I found the issue: Before starting the server, run these commands:

cd server
cargo install diesel_cli --no-default-features --features postgres
diesel setup
diesel migration run

Then it should work. I think the issue was that the database wasn't set up correctly, I missed putting that step in the instructions.

ravinder-Olivier commented 11 months ago

I tried all of those, uninstalling and reinstalling diesel_cli, following the instructions, and I'm still left with the attached screenshot Screen Shot 2023-11-03 at 9 26 18 PM

RedstoneWizard08 commented 11 months ago

You're not using the username and password you registered with. That's why. It's working as intended.

ravinder-Olivier commented 11 months ago

I'm not so sure, it's giving me errors when I try to register or login, and when I try on the webclient I'm stuck on the login page. Screen Shot 2023-11-04 at 10 17 31 PM

RedstoneWizard08 commented 11 months ago

Calling register again will return invalid because the user already exists.

RedstoneWizard08 commented 11 months ago

And you're stuck because it doesn't do anything after login, you need to implement that

ravinder-Olivier commented 11 months ago

1. Screen Shot 2023-11-05 at 12 35 21 PM It happens when I try with a new user too, and I supposed to do a different type of request?

  1. Oh, ok, I thought it took to the Account page
RedstoneWizard08 commented 11 months ago

ok idk why thats happening now

RedstoneWizard08 commented 11 months ago

if you cant figure this out just write it in js idk its ur project

RedstoneWizard08 commented 11 months ago

sorry