Closed GurinderRawala closed 4 weeks ago
The changes involve updates to the README.md
file to include a new step for building the server. Additionally, enhancements were made to the file upload and delete routes in the src/api/routes/files.js
file, focusing on logging and error handling. The CORS configuration in src/api/server.js
was modified to allow requests from any origin, improving API accessibility.
File | Change Summary |
---|---|
README.md | Added a step in "Get Started" for building the server with the command npm run build . |
src/api/routes/files.js | Introduced a logging statement for successful file uploads and improved error handling for deletions. |
src/api/server.js | Modified CORS configuration to allow requests from any origin by changing origin to '*' . |
sequenceDiagram
participant User
participant Server
participant Database
User->>Server: Upload file
Server->>Database: Save file info
Database-->>Server: Confirmation
Server->>User: File uploaded successfully
Server->>Server: Log "file info uploaded successfully"
User->>Server: Delete file
Server->>Database: Find file info
Database-->>Server: Error (if any)
Server->>Server: Log error details
Server->>User: Respond with error (if any)
🐰 "In the land of code, where changes bloom,
A README now guides, dispelling the gloom.
With logs to trace, and errors in sight,
Our server's more ready, to take on the night!
CORS now wide open, for all to partake,
A hop towards progress, for every bunny's sake!" 🐇
Summary by CodeRabbit
New Features
Enhancements
Accessibility Improvements