Closed PluieM closed 3 weeks ago
The recent updates introduce significant enhancements to the peerbanhelper
project. Key changes include the introduction of the IPBanRuleUpdateType
enum to replace string types for update types, improving type safety and readability. Additionally, new response classes SlimMsg
and StdMsg
have been added for standardized JSON responses. Various methods across the project have been refactored to accommodate these changes, ensuring a more robust and maintainable codebase.
File(s) | Change Summary |
---|---|
DatabaseHelper.java , RuleSubLog.java |
Updated method signatures and field types to use IPBanRuleUpdateType instead of String . |
IPBanRuleUpdateType.java |
Introduced a new enum IPBanRuleUpdateType with constants AUTO and MANUAL . |
IPBlackRuleList.java |
Modified the updateRule method to use IPBanRuleUpdateType and return SlimMsg . |
RuleSubController.java |
Refactored methods to return SlimMsg or StdMsg instead of Map , and introduced a new SubInfo record. |
SlimMsg.java , StdMsg.java |
Introduced new record classes SlimMsg and StdMsg for standardized response messages. |
Lang.java |
Modified error message templates and added a new error message related to querying IP ban rule update logs. |
In the realm of code so bright,
Enums and messages take flight,
WithSlimMsg
andStdMsg
in the fray,
Errors and logs now have their say.
A rabbit's joy in every byte,
Making code both clear and right.
🌟🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@Gaojianli #152 中提到的改动意见已全部调整,相关接口文档也已更新 1、新增标准响应Record 2、保存规则时的参数校验调整 3、订阅规则更新日志中的更新类型使用枚举写库
Summary by CodeRabbit
New Features
SlimMsg
andStdMsg
) for API responses.Refactor
Bug Fixes