wavesinaroom / my_odin_project_dance_school

Dance school booking system with Express.js
0 stars 0 forks source link

Student controller #4

Open wavesinaroom opened 1 year ago

wavesinaroom commented 1 year ago

Student controller is much simpler than admin controller. Students can basically book or cancel their lessons with it.

wavesinaroom commented 11 months ago

Just forgot to mention that students are obviously able to reset their password with a dedicated menu

wavesinaroom commented 11 months ago

Student profile main menu was good practice of all knowledge applied to admin. There's just a couple of differences between these profiles but I didn't want to copy and paste code from admin profile because I wanted to practice more what I'd already learned. To my surprise there were still some holes in my foundations that I could filled by going the process step by step without avoiding recurring bugs on the way.

wavesinaroom commented 11 months ago

I finally found out a way to redirect unauthorized users but it's not the most elegant solution. I wish I could use just one middleware from app.js to redirect any request that has an undefined user. However, after lots of trying that wasn't possible

wavesinaroom commented 11 months ago

UX is enormously improved with user feedback prompted on errors. Also, I change the design because it didn't make sense, students shouldn't need to search their own names in the database when they are already logged