Return `DeviceController#linkDevice` to synchronous processing

This commit is contained in:
Jon Chambers 2023-12-12 10:54:04 -05:00 committed by Jon Chambers
parent 3cbbf37468
commit 07899f35bd
1 changed files with 3 additions and 2 deletions

View File

@ -181,7 +181,7 @@ public class DeviceController {
@ApiResponse(responseCode = "429", description = "Too many attempts", headers = @Header( @ApiResponse(responseCode = "429", description = "Too many attempts", headers = @Header(
name = "Retry-After", name = "Retry-After",
description = "If present, an positive integer indicating the number of seconds before a subsequent attempt could succeed")) description = "If present, an positive integer indicating the number of seconds before a subsequent attempt could succeed"))
public CompletableFuture<DeviceResponse> linkDevice(@HeaderParam(HttpHeaders.AUTHORIZATION) BasicAuthorizationHeader authorizationHeader, public DeviceResponse linkDevice(@HeaderParam(HttpHeaders.AUTHORIZATION) BasicAuthorizationHeader authorizationHeader,
@NotNull @Valid LinkDeviceRequest linkDeviceRequest, @NotNull @Valid LinkDeviceRequest linkDeviceRequest,
@Context ContainerRequest containerRequest) @Context ContainerRequest containerRequest)
throws RateLimitExceededException, DeviceLimitExceededException { throws RateLimitExceededException, DeviceLimitExceededException {
@ -255,7 +255,8 @@ public class DeviceController {
.thenApply(accountAndDevice -> new DeviceResponse( .thenApply(accountAndDevice -> new DeviceResponse(
accountAndDevice.first().getIdentifier(IdentityType.ACI), accountAndDevice.first().getIdentifier(IdentityType.ACI),
accountAndDevice.first().getIdentifier(IdentityType.PNI), accountAndDevice.first().getIdentifier(IdentityType.PNI),
accountAndDevice.second().getId())); accountAndDevice.second().getId()))
.join();
} }
@PUT @PUT