UB-ES-2024-A4 / book-hub

0 stars 0 forks source link

Connect Frontend and Backend to Update User Profile Picture #15

Closed Soliam006 closed 3 hours ago

Soliam006 commented 4 hours ago

This PR establishes the connection between the frontend and backend, enabling users to view and update their profile picture in real-time.

Changes Implemented:

Frontend:

Created a Icon Camera allowing users to upload a new profile picture. Integrated API request logic using fetch to send the image to the backend. (actions.ts) Updated the UI to display the new profile picture after a successful upload.

Backend: Created a new endpoint to handle profile picture updates (e.g., PUT /pfp/{user_ID}). Updated the user profile data in the database with the new image.