Skip to content

Commit b10893d

Browse files
committed
Use client_id parameter instead.
1 parent 9fa7d9d commit b10893d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/powersync/lib/src/streaming_sync.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ class StreamingSyncImplementation {
200200
if (credentials == null) {
201201
throw CredentialsException("Not logged in");
202202
}
203-
final uri = credentials.endpointUri('write-checkpoint2.json');
203+
final uri =
204+
credentials.endpointUri('write-checkpoint2.json?client_id=$clientId');
204205

205206
Map<String, String> headers = {
206207
'Content-Type': 'application/json',
207208
'Authorization': "Token ${credentials.token}",
208-
'Client-ID': clientId!,
209209
..._userAgentHeaders
210210
};
211211

@@ -415,7 +415,6 @@ class StreamingSyncImplementation {
415415
final request = http.Request('POST', uri);
416416
request.headers['Content-Type'] = 'application/json';
417417
request.headers['Authorization'] = "Token ${credentials.token}";
418-
request.headers['Client-ID'] = clientId!;
419418
request.headers.addAll(_userAgentHeaders);
420419

421420
request.body = convert.jsonEncode(data);

0 commit comments

Comments
 (0)