From bc1d107c34e6f4e5bd65f88464bae580196b6fc2 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Tue, 24 Sep 2024 11:56:05 +0200 Subject: [PATCH] introduce targetUnixUser property for domain-setup booking-item --- .../booking/item/HsBookingItemController.java | 1 + .../HsDomainSetupBookingItemValidator.java | 10 ++++ ...mainSetupBookingItemValidatorUnitTest.java | 55 +++++++++++++++++-- 3 files changed, 61 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemController.java b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemController.java index 6afd5219..acf2fe40 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemController.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemController.java @@ -71,6 +71,7 @@ public class HsBookingItemController implements HsBookingItemsApi { .buildAndExpand(saved.getUuid()) .toUri(); final var mapped = mapper.map(saved, HsBookingItemResource.class, ENTITY_TO_RESOURCE_POSTMAPPER); + return ResponseEntity.created(uri).body(mapped); } diff --git a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsDomainSetupBookingItemValidator.java b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsDomainSetupBookingItemValidator.java index c9fd731a..f42ea4e0 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsDomainSetupBookingItemValidator.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsDomainSetupBookingItemValidator.java @@ -1,3 +1,4 @@ + package net.hostsharing.hsadminng.hs.booking.item.validators; import net.hostsharing.hsadminng.hs.booking.item.HsBookingItem; @@ -15,6 +16,9 @@ class HsDomainSetupBookingItemValidator extends HsBookingItemEntityValidator { public static final String FQDN_REGEX = "^((?!-)[A-Za-z0-9-]{1,63}(?