Daily Updates: New Features, Bug Fixes, & Code Cleanup
What developments have taken place today?
This update introduces a new feature allowing users to download the analytics protocol buffer definition file (analytics.proto
) via a dedicated route at /website/:id/protofile
. The implementation ensures proper HTTP headers are set, classifying the file as an attachment and delivering it directly to the user’s browser. A brief informational message has also been added to guide users interested in GRPC integration towards this new functionality.
A critical bug related to retrieving user IDs from session data has been resolved. The code now reliably accesses the user ID using sessionData.UserId
instead of the previous, incorrect method (session.Get("userId").(int)
), guaranteeing accurate validation processes.
Two binary executables, visit_counter
and writer
, have been removed from the project codebase. This streamlining eliminates unnecessary files and reduces repository size.
Finally, Git’s ignore list has been expanded to exclude binaries located within the command/grpc_client/bin
, command/visit_counter/bin
, and command/writer/bin
directories. This prevents accidental tracking of executable files in the version control system, contributing to a cleaner and more focused repository.
These changes collectively improve website accessibility by providing access to essential protocol definition files, enhance data integrity through accurate user ID retrieval, reduce codebase bloat by removing unused executables, and maintain code quality by preventing unnecessary file tracking within the repository.