Skip to content

Commit

Permalink
Return DeviceController#linkDevice to synchronous processing
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-signal committed Dec 12, 2023
1 parent 3cbbf37 commit 07899f3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public VerificationCode createDeviceToken(@Auth AuthenticatedAccount auth)
@ApiResponse(responseCode = "429", description = "Too many attempts", headers = @Header(
name = "Retry-After",
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,
@Context ContainerRequest containerRequest)
throws RateLimitExceededException, DeviceLimitExceededException {
Expand Down Expand Up @@ -255,7 +255,8 @@ public CompletableFuture<DeviceResponse> linkDevice(@HeaderParam(HttpHeaders.AUT
.thenApply(accountAndDevice -> new DeviceResponse(
accountAndDevice.first().getIdentifier(IdentityType.ACI),
accountAndDevice.first().getIdentifier(IdentityType.PNI),
accountAndDevice.second().getId()));
accountAndDevice.second().getId()))
.join();
}

@PUT
Expand Down

0 comments on commit 07899f3

Please sign in to comment.