Closed GurinderRawala closed 4 weeks ago
The changes in this pull request include updates to the README.md
file to clarify the server build process, enhancements to logging and error handling in the file upload and delete routes within src/api/routes/files.js
, and a modification of the CORS configuration in src/api/server.js
to allow requests from any origin. These updates aim to improve user guidance and system reliability.
File | Change Summary |
---|---|
README.md | Added npm run build command in the "Get Started" section for clarity on server setup. |
src/api/routes/files.js | Added logging for successful file uploads and improved error handling in the delete file route. |
src/api/server.js | Changed CORS configuration from a specific origin to a wildcard to allow requests from any origin. |
sequenceDiagram
participant User
participant Server
participant Database
User->>Server: Upload file
Server->>Database: Save file info
Database-->>Server: Confirm save
Server->>User: File uploaded successfully
Server->>Server: Log "file info uploaded successfully"
User->>Server: Delete file
Server->>Database: Find file
alt File found
Database-->>Server: Confirm deletion
Server->>User: File deleted
else Error occurred
Database-->>Server: Error finding data
Server->>Server: Log "error updating finding data, something went wrong"
Server->>User: Error response
end
🐇 "In the README, a command was added,
To build the server, now it's not so maddened.
Logs for uploads, errors now clear,
A CORS change makes access sincere.
With each little tweak, our code does delight,
Hopping along, everything feels right!" 🐰
Summary by CodeRabbit
New Features
npm run build
).Bug Fixes
Improvements