So what I am trying to do is to check if a user is already exist inside my db then he/she cannot register to a tournament, otherwise he/she can register. There is two models/collections associated which is a User and Register. Somehow, with empty database inside the Register collection. I managed to register the first new user, after that I tried to register a another new user as well but it says 'user already registered'. Here are sample input form of User1 (right) and User2 (left). Both Users id are different and User2 Id don't event exist inside my register collection, but I get 'user already registered' error when trying to register User2. Below are code of how I submit and check if such user exist before registering. Can someone point what I am missing here or what I did wrong? Think I'm going crazy.register.jsregister_tournament.pugregister schemaThe process of registration is he/she view the specific tournament post by id where the view is tournament.pug so he/she can click the registration button that would lead to register_tournament.pug. Here also extra code for reference.tournament.jstournament.pug
Submitted November 06, 2019 at 06:06PM by exspade
No comments:
Post a Comment