Dhanno98 commented on PR #6448: URL: https://github.com/apache/fineract/pull/6448#issuecomment-6347452682
> * The delegate / interface / resource is three classes for four identical one-liners (`authenticatedUser()` is redundant, `logCommandSource` already checks permission). `RedeemRequest` / `AdditionalSharesRequest` and the approve/reject request classes are identical pairs. I introduced the separate API, delegate and resource layers following the existing V2 API structure in Fineract. For eg, `AuditsV2ApiResource`, `ClientSearchV2ApiResource`, and other such V2 resources all follow the same API -> delegate -> resource pattern. For the delegate implementation, I also followed the existing V1 `handleCommands()` flow to authenticate the user, create the `CommandWrapper`, and pass it to `PortfolioCommandSourceWritePlatformService`. This is why `authenticatedUser()` is explicitly called in the V2 delegate. I agree that since `logCommandSource` already performs the required permission check, the explicit `authenticatedUser()` call is redundant, and the request models could also be simplified. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
