I decided to create a real website which is upgraded version of my first personal project
At this time, I am addressing server, backend using Node.js
the details you have to focus upon is
form class = "" method = "post" action = "route you want to use
Point : you have to make both GET, POST route !!
I want to let page stay in current page, if error happens
but the problem is, even if the error happens, server receives the request from the client, and deal with it...
if you use the div, What I guess is, it sends request to server, regardless of the existence of error
So I used Div instead
it seems like ajax itself is working....but why only role is not sent to server??
I checked the User.js in order to check the usermodel schema
There was an error here, I had to revise "role" into "type"
so it seems like, html file is appropriately sending the info to the server, but it seems like, it is not saving it into the DB....