(core) Enabling telemetry on /api/version endpoint

Summary:
Version API endpoint wasn't logging telemetry from POST requests. The issue was in registration
order, this endpoint was registered before `expressJson` and it couldn't read json body in the handler.

Test Plan: Added new test

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D4277
This commit is contained in:
Jarosław Sadziński
2024-06-26 15:49:13 +02:00
parent 05214d8f9a
commit 184be9387f
8 changed files with 41 additions and 27 deletions

View File

@@ -4029,7 +4029,7 @@ function testDocApi() {
...pick(options, 'name', 'memo', 'enabled', 'watchedColIds'),
}, chimpy
);
assert.equal(status, 200);
assert.equal(status, 200, `Error during subscription: ` + JSON.stringify(data));
return data as WebhookSubscription;
}