Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 1.0.0-BETA32

* Added `onChange` method to the PowerSync client. This allows for observing table changes.
* Removed unnecessary `User-Id` header from internal PowerSync service requests.

## 1.0.0-BETA31

Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ Current limitations:

- Integration with SQLDelight schema and API generation (ORM) is not yet supported.

Future work/ideas:
- Attachments helper package.

## Installation

Add the PowerSync Kotlin Multiplatform SDK to your project by adding the following to your `build.gradle.kts` file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ public data class PowerSyncCredentials(
/**
* User ID.
*/
@SerialName("user_id") val userId: String?,
@Deprecated(
message = "This property is no longer used.",
replaceWith = ReplaceWith(""),
Comment thread
stevensJourney marked this conversation as resolved.
Outdated
level = DeprecationLevel.WARNING,
)
@SerialName("user_id")
val userId: String?,
) {
override fun toString(): String = "PowerSyncCredentials<endpoint: $endpoint userId: $userId>"

Expand Down
2 changes: 0 additions & 2 deletions core/src/commonMain/kotlin/com/powersync/sync/SyncStream.kt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ internal class SyncStream(
contentType(ContentType.Application.Json)
headers {
append(HttpHeaders.Authorization, "Token ${credentials.token}")
append("User-Id", credentials.userId ?: "")
}
}
if (response.status.value == 401) {
Expand Down Expand Up @@ -202,7 +201,6 @@ internal class SyncStream(
contentType(ContentType.Application.Json)
headers {
append(HttpHeaders.Authorization, "Token ${credentials.token}")
append("User-Id", credentials.userId ?: "")
}
timeout { socketTimeoutMillis = Long.MAX_VALUE }
setBody(bodyJson)
Expand Down