vaibhav-rm / Library-Management-System

5 stars 5 forks source link

no deafult avatar image is selected for new user creation #1

Open vaibhav-rm opened 1 month ago

vaibhav-rm commented 1 month ago

The user schema asks for an avatar image for every user created the code to handle upload (using multer) and store it somewhere (cloudinary) is written but there is no default avatar image nor a field to upload image in the register form in frontend/src/pages/Register.jsx

mrhat05 commented 1 month ago

should we add a input field in the register page and connect to backend also add a default avatar(if user doesnt upload nothing)

vaibhav-rm commented 1 month ago

Should we add an input field in the register page and connect to the backend? Also, add a default avatar (if the user doesn't upload anything)?

Sure! Also, there might be more bugs in the register page. I only tested the register API (both admin and student) using Postman.

The API is:
localhost:8000/users/register/

image

vaibhav-rm commented 1 month ago

should we add a input field in the register page and connect to backend also add a default avatar(if user doesnt upload nothing)

what do you think is a better approach? adding a default user avatar? or just making the field not required like in the current case?. If there is a default one I would like it to be the first letter of the user's username, also please star the repo.

mrhat05 commented 1 month ago

ok i will try to work on it

vaibhav-rm commented 1 month ago

ok i will try to work on it

Any updates? or you need any help?