File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/commonTest/kotlin/com.adamratzman/spotify Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ val _clientSecret = getEnvironmentVariable("SPOTIFY_CLIENT_SECRET")
6
6
val _redirectUri = getEnvironmentVariable(" SPOTIFY_REDIRECT_URI" )
7
7
val _tokenString = getEnvironmentVariable(" SPOTIFY_TOKEN_STRING" )
8
8
9
- val api = when {
9
+ val api = {
10
+ println (_redirectUri )
11
+ println (_clientId )
12
+ println (_redirectUri .isNullOrBlank())
13
+ println (_clientId .isNullOrBlank())
14
+
15
+ }.let { when {
10
16
_redirectUri ?.isNotBlank() != true -> {
11
17
spotifyAppApi {
12
18
credentials {
@@ -15,7 +21,7 @@ val api = when {
15
21
}
16
22
}.build()
17
23
}
18
- _clientId != null -> {
24
+ _clientId ?.isNotBlank() == true -> {
19
25
spotifyClientApi {
20
26
credentials {
21
27
clientId = _clientId
@@ -29,6 +35,7 @@ val api = when {
29
35
}
30
36
else -> null
31
37
}
38
+ }
32
39
33
40
expect fun getEnvironmentVariable (name : String ): String?
34
41
You can’t perform that action at this time.
0 commit comments