facg3 / MWM-Shop_Project

2 stars 1 forks source link

Inconsistent return types #29

Open SamerElaila opened 6 years ago

SamerElaila commented 6 years ago

https://github.com/facg3/MWM-Shop_Project/blob/e761e4d5a61dcf82570f808e98c8e50b8f240905/src/handler.js#L59

here you are returning JSON if everything is ok , but if the user is not authenticated you are returning redirecting to / and that route returns HTML.

Please be consistent!!

MahmoudMH commented 6 years ago

Done