Fix authentication with API token on v0.5.6

This commit is contained in:
Kirill Kamakin
2022-12-16 21:23:43 +01:00
parent e7b57649b5
commit 913ac84310
5 changed files with 15 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ class AuthDataSourceImpl @Inject constructor(
}
override suspend fun createApiToken(name: String): String = when (getVersion()) {
ServerVersion.V0 -> v0Source.createApiToken(CreateApiTokenRequestV0(name))
ServerVersion.V0 -> v0Source.createApiToken(CreateApiTokenRequestV0(name)).token
ServerVersion.V1 -> v1Source.createApiToken(CreateApiTokenRequestV1(name)).token
}
}