feat(sqlite): Add ReassignCategoryFromMonth to expense repo#19
feat(sqlite): Add ReassignCategoryFromMonth to expense repo#19madalinpopa merged 9 commits intomainfrom
Conversation
Allows reassigning all expenses from one category to another for a given month.
Implements method to reassign all expenses from one category to another for a given month.
Adds coverage for reassigning expense categories for a specific month.
Reassign expenses to the new category for the selected month when a recurrent category is forked.
Refactor category use case tests to accept and inject a mock ExpenseRepository, enabling more precise control and assertions in future tests involving expense-category interactions.
Summary of ChangesHello @madalinpopa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a crucial feature for managing expense categories by enabling the reassignment of expenses from one category to another for a specified month. This functionality is seamlessly integrated into the category update process, particularly for recurrent categories, ensuring that historical expense data remains accurate and aligned with category changes over time. This enhancement improves the flexibility and maintainability of expense categorization. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a feature to reassign expenses from one category to another, starting from a specified month. This is primarily used when forking a recurrent category. The implementation is logical and includes relevant tests. My main feedback concerns a potential security issue in the new ReassignCategoryFromMonth repository method, which currently doesn't scope the database update to a specific user. I've provided a suggestion to add user ID scoping to enhance security and data integrity.
Ensure ReassignCategoryFromMonth only updates expenses belonging to the specified user by adding userID to the query and method signature. Update tests accordingly.
Update category use case and mocks to require userID when reassigning categories for a given month. Adjust tests and mock signatures accordingly.
No description provided.