fix setting relation mark via API (#24)
Co-authored-by: Michael Hoennig <michael@hoennig.de> Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/24 Reviewed-by: Timotheus Pokorra <timotheus.pokorra@hostsharing.net>
This commit is contained in:
@ -70,6 +70,7 @@ public class HsOfficeRelationController implements HsOfficeRelationsApi {
|
||||
|
||||
final var entityToSave = new HsOfficeRelationEntity();
|
||||
entityToSave.setType(HsOfficeRelationType.valueOf(body.getType()));
|
||||
entityToSave.setMark(body.getMark());
|
||||
entityToSave.setAnchor(holderRepo.findByUuid(body.getAnchorUuid()).orElseThrow(
|
||||
() -> new NoSuchElementException("cannot find anchorUuid " + body.getAnchorUuid())
|
||||
));
|
||||
|
@ -55,6 +55,7 @@ components:
|
||||
nullable: true
|
||||
mark:
|
||||
type: string
|
||||
nullable: true
|
||||
contactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
@ -62,4 +63,4 @@ components:
|
||||
- anchorUuid
|
||||
- holderUuid
|
||||
- type
|
||||
- relContactUuid
|
||||
- contactUuid
|
||||
|
Reference in New Issue
Block a user