Skip to content

Commit e08ae1f

Browse files
committed
Fix Detekt issues
1 parent 917cb9b commit e08ae1f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/WPcomLoginClient.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class WPcomLoginClient @Inject constructor(
6363
} else {
6464
val json = response.body?.string() ?: return@withContext Result.failure(WPcomLoginError.InvalidResponse)
6565
val gson = Gson().fromJson(json, WPcomAuthorizationCodeResponse::class.java)
66-
Result.success(gson.access_token)
66+
Result.success(gson.accessToken)
6767
}
6868
}
6969
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package org.wordpress.android.fluxc.network.rest.wpapi.applicationpasswords
22

3+
import com.google.gson.annotations.SerializedName
4+
35
data class WPcomAuthorizationCodeResponse(
4-
val access_token: String,
5-
val token_type: String,
6-
val blog_id: String,
7-
val blog_url: String,
6+
@SerializedName("access_token") val accessToken: String,
7+
@SerializedName("token_type") val tokenType: String,
8+
@SerializedName("blog_id") val blogId: String,
9+
@SerializedName("blog_url") val blogUrl: String,
810
val scope: String
911
)

0 commit comments

Comments
 (0)