DEV Community

Discussion on: Blog API with Nodejs,Expressjs and Mongodb

Collapse
 
msnimbal profile image
msnimbal

How to test validity of the user if they try to post without logging in?

Collapse
 
collins87mbathi profile image
Collins Mbathi

In the register you can try to find user if they exist using ID.if the user exist it will return "the user exist " message.if the user doesnot then it will save the details..forgot to add the functionality

Collapse
 
msnimbal profile image
msnimbal

thanks Collins, I will look forward for your next post. This post is very well written and clear, It will be nice if you post something around managing state using cookie-session as well.

Thread Thread
 
collins87mbathi profile image
Collins Mbathi

Okay i will work on it