Skip to content

Commit

Permalink
Fix default LemmyApiRouter used (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV-GH authored Nov 15, 2024
1 parent 0d3feb1 commit f67055c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/src/commonMain/kotlin/it/vercruysse/lemmyapi/LemmyApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ object LemmyApi {
0, 1 -> it.vercruysse.lemmyapi.v0.x19.x0.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
2, 3 -> it.vercruysse.lemmyapi.v0.x19.x3.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
4, 5 -> it.vercruysse.lemmyapi.v0.x19.x4.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
6 -> it.vercruysse.lemmyapi.v0.x19.x6.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
else -> it.vercruysse.lemmyapi.v0.x19.x4.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
6, 7 -> it.vercruysse.lemmyapi.v0.x19.x6.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
else -> it.vercruysse.lemmyapi.v0.x19.x6.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
}

else -> throw NotSupportedException("Unsupported Lemmy minor version: $version")
Expand Down
2 changes: 1 addition & 1 deletion app/src/jvmTest/kotlin/GetCorrectControllerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class GetCorrectControllerTest {
assertInstanceOf(it.vercruysse.lemmyapi.v0.x19.x0.LemmyApiUniWrapper::class.java, controller3)

val controller4 = LemmyApi.getLemmyApi(instance = "lemmy.world", version = "0.19.9")
assertInstanceOf(it.vercruysse.lemmyapi.v0.x19.x4.LemmyApiUniWrapper::class.java, controller4)
assertInstanceOf(it.vercruysse.lemmyapi.v0.x19.x6.LemmyApiUniWrapper::class.java, controller4)

val controller5 = LemmyApi.getLemmyApi(instance = "lemmy.world", version = "0.19.2-alpha")
assertInstanceOf(it.vercruysse.lemmyapi.v0.x19.x3.LemmyApiUniWrapper::class.java, controller5)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ POM_DEVELOPER_URL=https://github.com/MV-GH

POM_ARTIFACT_ID=lemmy-api
GROUP=it.vercruysse.lemmyapi
VERSION_NAME=0.3.4-SNAPSHOT
VERSION_NAME=0.4.0-SNAPSHOT

0 comments on commit f67055c

Please sign in to comment.