Skip to content

Commit

Permalink
Merge pull request #129 from mgalaktionov/main
Browse files Browse the repository at this point in the history
bug-fix: Fixed integrations endpoint to match API documentation
  • Loading branch information
Cliftonz authored Jun 12, 2024
2 parents be248c6 + 54a2407 commit bff4a66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/co/novu/api/integrations/IntegrationsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public interface IntegrationsApi {

String ENDPOINT = "integrations";

@GET(ENDPOINT + "/get-integrations")
@GET(ENDPOINT)
Call<BulkIntegrationResponse> getIntegrations();

@POST(ENDPOINT + "/create-integrations")
@POST(ENDPOINT)
Call<SingleIntegrationResponse> createIntegration(@Body IntegrationRequest request);

@GET(ENDPOINT + "/active")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void test_getIntegrations() throws NovuNetworkException, IOException, Int
BulkIntegrationResponse response = integrationsHandler.getIntegrations();
RecordedRequest request = mockWebServer.takeRequest();

assertEquals("/integrations/get-integrations", request.getPath());
assertEquals("/integrations", request.getPath());
assertEquals("GET", request.getMethod());
assertEquals(gson.toJson(bulkIntegrationResponse), gson.toJson(response));
}
Expand All @@ -69,7 +69,7 @@ public void test_createIntegration() throws NovuNetworkException, IOException, I
SingleIntegrationResponse response = integrationsHandler.createIntegration(integrationRequest);
RecordedRequest request = mockWebServer.takeRequest();

assertEquals("/integrations/create-integrations", request.getPath());
assertEquals("/integrations", request.getPath());
assertEquals("POST", request.getMethod());
assertEquals(gson.toJson(singleIntegrationResponse), gson.toJson(response));
}
Expand Down

0 comments on commit bff4a66

Please sign in to comment.