Skip to content

Commit cc14f60

Browse files
committed
refactor: specify query params using a map
1 parent 4540691 commit cc14f60

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/com/ctrlhub/core/auth/AuthRouter.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ class AuthRouter(httpClient: HttpClient) : Router(httpClient = httpClient) {
6767
*/
6868
suspend fun complete(flowId: String, payload: LoginPayload): CompleteResponse {
6969
return try {
70-
performPost("${Config.authBaseUrl}/self-service/login?flow=$flowId", payload).body()
70+
performPost("${Config.authBaseUrl}/self-service/login", payload, mapOf(
71+
"flow" to flowId
72+
)).body()
7173
} catch (e: ClientRequestException) {
7274
if (e.response.status == HttpStatusCode.BadRequest) {
7375
val bodyAsString: String = e.response.body()

0 commit comments

Comments
 (0)