Skip to content

Commit 00118b4

Browse files
committed
fix: tests
1 parent bf4ba7c commit 00118b4

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

mock-server/app/http.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@
7474
->label('scope', 'public')
7575
->label('sdk.response.code', Response::STATUS_CODE_OK)
7676
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
77-
->inject('response')
78-
->param('projectId', '', new Text(256), 'Project ID')
79-
->action(function () {
77+
->inject('request')
78+
->action(function (Request $request) {
79+
$projectId = $request->getHeader('x-appwrite-project', '');
80+
8081
if (empty($projectId)) {
8182
throw new Exception(Exception::GENERAL_MOCK, 'Missing project ID');
8283
}

templates/node/src/client.ts.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class Client {
241241
}
242242

243243
async ping(): Promise<string> {
244-
return this.call('GET', new URL('/ping', this.config.endpoint), {}, {}, 'json');
244+
return this.call('GET', new URL(this.config.endpoint + '/ping'));
245245
}
246246

247247
async redirect(method: string, url: URL, headers: Headers = {}, params: Payload = {}): Promise<string> {

templates/web/src/client.ts.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ class Client {
635635
}
636636

637637
async ping(): Promise<string> {
638-
return this.call('GET', new URL('/ping', this.config.endpoint), {}, {}, 'json');
638+
return this.call('GET', new URL(this.config.endpoint + '/ping'));
639639
}
640640

641641
async call(method: string, url: URL, headers: Headers = {}, params: Payload = {}, responseType = 'json'): Promise<any> {

0 commit comments

Comments
 (0)