Skip to content

Commit

Permalink
fix(#76-support-auth-header): killmeplsagainandagain
Browse files Browse the repository at this point in the history
  • Loading branch information
y9Kap committed Oct 8, 2023
1 parent d9f2097 commit 2bdf3a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,15 @@ internal class MeetingsEngine(
}

val string = httpClient.post(url.string) {
headers {
append("Authorization", token.string)
}
setBody(
TextContent(
text = jsonObject.toString(),
contentType = ContentType.Application.Json
)
)
header("Authorization", token)
}.body<String>()

val meeting = Json.decodeFromString<EditMeetingResponse>(string).result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,17 @@ internal class UsersEngine(
}

val string = httpClient.post(url.string) {
headers {
append("Authorization", token.string)
}
setBody(
TextContent(
text = jsonObject.toString(),
contentType = ContentType.Application.Json
)

)
header("Authorization", token)

}.body<String>()

val user = Json.decodeFromString<EditUserResponse>(string).result
Expand Down

0 comments on commit 2bdf3a1

Please sign in to comment.