AshharAhmadKhan opened a new pull request, #6325:
URL: https://github.com/apache/fineract/pull/6325
## Description
EmailApiResource exposes CREATE, RETRIEVE, UPDATE, DELETE endpoints for
/v1/email. CREATE and DELETE have working @CommandType handlers; UPDATE
does not, so calling the UPDATE endpoint throws UnsupportedCommandException
despite the endpoint existing and being documented.
Everything downstream of the handler already exists and is correct:
- EmailWritePlatformService.update(Long, JsonCommand) — interface method
already declared
- EmailWritePlatformServiceJpaRepositoryImpl.update(...) — already
implemented
- EmailApiResource.java — already calls
CommandWrapperBuilder().updateEmail(resourceId)
- UPDATE_EMAIL permission — already exists in
0002_initial_data.xml, same pattern as CREATE_EMAIL/DELETE_EMAIL
The only missing piece was the command handler itself, routing
@CommandType(entity="EMAIL", action="UPDATE") to the existing service
method. This PR adds that handler, matching the structural pattern of
CreateEmailCommandHandler and the sibling UpdateEmailCampaignCommandHandler.
Note: no test coverage exists for the /emails resource at any layer, and
a separate, pre-existing validator bug was found while investigating this
(EmailDataValidator validates against the wrong resource's constants,
ScheduledEmailConstants instead of EmailApiConstants). Both are tracked
and will be addressed in a separate ticket/PR, since they are independent
of this handler-wiring fix.
See https://issues.apache.org/jira/browse/FINERACT-2782
--
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]