Skip to content

Commit

Permalink
fix(#76-support-auth-header): change name of field avatarId
Browse files Browse the repository at this point in the history
  • Loading branch information
y9Kap committed Oct 22, 2023
1 parent ae91e90 commit 3c4ca81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public suspend inline fun <T, R : MeetacyRequestWithToken<T>> post(
jsonObject: JsonObject,
httpClient: HttpClient,
request: R
): String {
return httpClient.post(urlString) {
): String =
httpClient.post(urlString) {
setBody(
TextContent(
text = jsonObject.toString(),
Expand All @@ -25,7 +25,7 @@ public suspend inline fun <T, R : MeetacyRequestWithToken<T>> post(
header("Authorization", request.token.string)
header("Api-Version", request.apiVersion.int.toString())
}.body<String>()
}


public suspend inline fun <T, R : TokenProviderEmpty<T>> postWithoutToken(
url: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal class MeetingsEngine(
val url = baseUrl / "meetings" / "history" / "list"

val jsonObject = buildJsonObject {
put("amount", amount.int)
put("amount", amount.int.toString())
put("pagingId", pagingId?.string)
}

Expand All @@ -62,7 +62,7 @@ internal class MeetingsEngine(
val url = baseUrl / "meetings" / "history" / "active"

val jsonObject = buildJsonObject {
put("amount", amount.int)
put("amount", amount.int.toString())
put("pagingId", pagingId?.string)
}

Expand All @@ -84,7 +84,7 @@ internal class MeetingsEngine(
val url = baseUrl / "meetings" / "history" / "past"

val jsonObject = buildJsonObject {
put("amount", amount.int)
put("amount", amount.int.toString())
put("pagingId", pagingId?.string)
}

Expand Down Expand Up @@ -127,14 +127,14 @@ internal class MeetingsEngine(

val jsonObject = buildJsonObject {
put("title", title)
put("description", description)
put("date", date.iso8601)
putJsonObject("location") {
put("latitude", location.latitude)
put("longitude", location.longitude)
}
put("description", description)
put("visibility", visibility.name.lowercase())
put("fileId", fileId?.string)
put("avatarId", fileId?.string)
}

val string = httpClient.post(url.string) {
Expand Down

0 comments on commit 3c4ca81

Please sign in to comment.