class CompetitionSetupFinanceUserController {

    @PostMapping("/finance-users/create/{inviteHash}")
    public RestResult<Void> createCompetitionFinanceUser(@PathVariable("inviteHash") String inviteHash, @RequestBody CompetitionFinanceRegistrationResource competitionFinanceRegistrationResource) {
        return registrationService.createUser(anUserCreationResource()
                .withFirstName(competitionFinanceRegistrationResource.getFirstName())
                .withLastName(competitionFinanceRegistrationResource.getLastName())
                .withPassword(competitionFinanceRegistrationResource.getPassword())
                .withInviteHash(inviteHash)
                .withRole(Role.EXTERNAL_FINANCE)
                .build())
                .andOnSuccessReturnVoid()
                .toPostCreateResponse();
    }

}