class AffiliationController {

    @PutMapping("/id/{userId}/update-user-affiliations")
    public RestResult<Void> updateUserAffiliations(@PathVariable("userId") long userId,
                                                   @Valid @RequestBody AffiliationListResource affiliations) {
        return affiliationService.updateUserAffiliations(userId, affiliations).toPutResponse();
    }

}