Closed DaveLuhman closed 1 month ago
This pull request addresses two main issues: improving the archive URL resolution for tools and updating the static file serving method. The changes enhance the reliability of the archiving feature and improve the robustness of static file serving across different environments.
sequenceDiagram
actor User
participant Browser
participant Server
User->>Browser: Click archive button
Browser->>Browser: Prevent default action
Browser->>User: Confirm archiving
alt User confirms
Browser->>Browser: Retrieve URL from button's child
Browser->>Server: Navigate to archive URL
end
classDiagram
class Server {
- express.static(path.join(__dirname, 'public'))
}
note for Server "Static files are now served using an absolute path for better reliability across environments."
Change | Details | Files |
---|---|---|
Updated static file serving to use an absolute path |
|
src/server.js |
Refactored archive function to dynamically retrieve URLs |
|
src/public/js/editTool.js |
Refactored the archive function to dynamically retrieve URLs from the button elements, ensuring correctness when archiving tools. Updated the method for serving static files to use an absolute path, enhancing clarity and avoiding potential path-related errors, especially in different environments. This change improves code maintainability and reliability across various deployment setups.
This change is
Summary by Sourcery
Fix archive URL resolution and update static file path handling to improve code reliability and maintainability across different environments.
Bug Fixes:
Enhancements: