Skip to content

Commit

Permalink
Last minute Airbyte API cutover fixes (#11552)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonsSpaghetti committed Mar 7, 2024
1 parent b57aeeb commit 2eab3ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.airbyte.server.apis.publicapi.helpers

import io.airbyte.server.apis.publicapi.constants.ROOT_PATH

fun removePublicApiPathPrefix(path: String): String {
return path.removePrefix("/public/api")
return path.removePrefix(ROOT_PATH)
}
15 changes: 15 additions & 0 deletions airbyte-server/src/test/kotlin/helpers/PathHelperTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package helpers

import io.airbyte.server.apis.publicapi.helpers.removePublicApiPathPrefix
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

class PathHelperTest {
@Test
fun testRemovePublicApiPathPrefix() {
assertEquals(
"/v1/health",
removePublicApiPathPrefix("/api/public/v1/health"),
)
}
}

0 comments on commit 2eab3ad

Please sign in to comment.