we-festify / festify

The best college/university fests and events management framework
https://we-festify.gitbook.io/festify/
Apache License 2.0
18 stars 14 forks source link

Update the documentation for User Model and Auth API #19

Open jindalujjwal0720 opened 1 year ago

jindalujjwal0720 commented 1 year ago

Updating the User Model and Auth API documentation is essential to ensure that developers and users have accurate and up-to-date information about these critical components of our application. Well-maintained documentation is crucial for smoothly developing, understanding, and using the User Model and Auth API.

MrDBC commented 1 year ago

im new to documentation. could u please give some references, how the documentation should look like?

@jindalujjwal0720

jindalujjwal0720 commented 1 year ago

im new to documentation. could u please give some references, how the documentation should look like?

@jindalujjwal0720

There is a docs folder in the repository and there are some files there in proper format. Do check out.

MrDBC commented 1 year ago

OK I went through it can u assign this task to me? @jindalujjwal0720

MrDBC commented 1 year ago

@jindalujjwal0720 could you please look into my PR?

bhupendraKhatri12 commented 1 year ago

hi while registring the user or login user code is destructing the user from req.body which doesnt exist and getting instead destructing const {user} = req.body we need to change the const user =req.user to avoid object destructing error while login or register

bhupendraKhatri12 commented 1 year ago

Please assign the task to me i have fixe the auth service

jindalujjwal0720 commented 1 year ago

hi while registring the user or login user code is destructing the user from req.body which doesnt exist and getting instead destructing const {user} = req.body we need to change the const user =req.user to avoid object destructing error while login or register

Hi, the destructuring is like this const { user } = req.body and since req.body always exists, therefore there will be no error in that line. Yes, a nice optimisation can be to check whether the user exists or not, if not, throw an error then and there only instead of destructuring from undefined.

bhupendraKhatri12 commented 1 year ago

okay i have done the refactored the code