Skip to content

Commit

Permalink
Fix the annotation for the refresh endpoint (#12075)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmoriceau committed Apr 11, 2024
1 parent d5bd6d2 commit 58a7969
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,11 @@ public ConnectionReadList listConnectionsForWorkspacesPaginated(
return ApiHelper.execute(() -> connectionsHandler.listConnectionsForWorkspaces(listConnectionsForWorkspacesRequestBody));
}

@Post(uri = "/refresh")
@Secured({WORKSPACE_EDITOR, ORGANIZATION_EDITOR})
@ExecuteOn(AirbyteTaskExecutors.SCHEDULER)
@Override
public BooleanRead refreshConnectionStream(ConnectionStreamRefreshRequestBody connectionStreamRefreshRequestBody) {
public BooleanRead refreshConnectionStream(@Body final ConnectionStreamRefreshRequestBody connectionStreamRefreshRequestBody) {
return ApiHelper.execute(() -> new BooleanRead().value(streamRefreshesHandler.createRefreshesForConnection(
connectionStreamRefreshRequestBody.getConnectionId(),
connectionStreamRefreshRequestBody.getStreams() != null ? connectionStreamRefreshRequestBody.getStreams() : new ArrayList<>())));
Expand Down Expand Up @@ -252,15 +255,15 @@ public JobInfoRead resetConnectionStream(@Body final ConnectionStreamRequestBody
@Post(uri = "/clear")
@Secured({WORKSPACE_EDITOR, ORGANIZATION_EDITOR})
@ExecuteOn(AirbyteTaskExecutors.SCHEDULER)
public JobInfoRead clearConnection(ConnectionIdRequestBody connectionIdRequestBody) {
public JobInfoRead clearConnection(@Body ConnectionIdRequestBody connectionIdRequestBody) {
return ApiHelper.execute(() -> schedulerHandler.resetConnection(connectionIdRequestBody));
}

@Override
@Post(uri = "/clear/stream")
@Secured({WORKSPACE_EDITOR, ORGANIZATION_EDITOR})
@ExecuteOn(AirbyteTaskExecutors.SCHEDULER)
public JobInfoRead clearConnectionStream(ConnectionStreamRequestBody connectionStreamRequestBody) {
public JobInfoRead clearConnectionStream(@Body ConnectionStreamRequestBody connectionStreamRequestBody) {
return ApiHelper.execute(() -> schedulerHandler.resetConnectionStream(connectionStreamRequestBody));
}

Expand Down

0 comments on commit 58a7969

Please sign in to comment.