Skip to content

Commit f67055c

Browse files
authored
Fix default LemmyApiRouter used (#78)
1 parent 0d3feb1 commit f67055c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/src/commonMain/kotlin/it/vercruysse/lemmyapi/LemmyApi.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ object LemmyApi {
140140
0, 1 -> it.vercruysse.lemmyapi.v0.x19.x0.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
141141
2, 3 -> it.vercruysse.lemmyapi.v0.x19.x3.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
142142
4, 5 -> it.vercruysse.lemmyapi.v0.x19.x4.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
143-
6 -> it.vercruysse.lemmyapi.v0.x19.x6.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
144-
else -> it.vercruysse.lemmyapi.v0.x19.x4.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
143+
6, 7 -> it.vercruysse.lemmyapi.v0.x19.x6.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
144+
else -> it.vercruysse.lemmyapi.v0.x19.x6.LemmyApiUniWrapper(client, semverV, baseUrlInstance, auth)
145145
}
146146

147147
else -> throw NotSupportedException("Unsupported Lemmy minor version: $version")

app/src/jvmTest/kotlin/GetCorrectControllerTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class GetCorrectControllerTest {
1616
assertInstanceOf(it.vercruysse.lemmyapi.v0.x19.x0.LemmyApiUniWrapper::class.java, controller3)
1717

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

2121
val controller5 = LemmyApi.getLemmyApi(instance = "lemmy.world", version = "0.19.2-alpha")
2222
assertInstanceOf(it.vercruysse.lemmyapi.v0.x19.x3.LemmyApiUniWrapper::class.java, controller5)

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ POM_DEVELOPER_URL=https://github.com/MV-GH
1919

2020
POM_ARTIFACT_ID=lemmy-api
2121
GROUP=it.vercruysse.lemmyapi
22-
VERSION_NAME=0.3.4-SNAPSHOT
22+
VERSION_NAME=0.4.0-SNAPSHOT
2323

0 commit comments

Comments
 (0)