adamsaghy commented on code in PR #4057: URL: https://github.com/apache/fineract/pull/4057#discussion_r1762990419
########## fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java: ########## @@ -156,4 +156,29 @@ public String updateConfiguration(@PathParam("configId") @Parameter(description return this.toApiJsonSerializer.serialize(result); } + + @PUT + @Path("/name/{configName}") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update Global Configuration by name", description = "Updates an enable/disable global configuration item by name") + @RequestBody(required = true, content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsRequest.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsResponse.class))) }) + public String updateConfigurationByName(@PathParam("configName") @Parameter(description = "configName") final String configName, + @Parameter(hidden = true) final String apiRequestBodyAsJson) { + + // TODO: Would be better to support string based identifier in Commands and resolve the entity by name in the + // service + final GlobalConfigurationPropertyData configurationData = this.readPlatformService.retrieveGlobalConfiguration(configName); + + final CommandWrapper commandRequest = new CommandWrapperBuilder() // Review Comment: Agree, hence the TODO comment above. But i dont think that should be part of this PR. -- 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: commits-unsubscr...@fineract.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org