From 252c7a221d8c491eb21e42eaf4ac3230514ef856 Mon Sep 17 00:00:00 2001 From: Dennis Ploeger Date: Mon, 9 May 2022 08:53:19 +0200 Subject: [PATCH] fix: Missing version information on check --- lib/api/Confluence.ts | 2 +- test/MockServer.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/api/Confluence.ts b/lib/api/Confluence.ts index 8438c93..d9bc004 100644 --- a/lib/api/Confluence.ts +++ b/lib/api/Confluence.ts @@ -68,7 +68,7 @@ export class Confluence { */ public async getDocumentInfo(documentId: number): Promise { this._log.debug(`Getting document information of document ${documentId}`) - const documentUrl = `${this.confluenceUrl}/rest/api/content/${documentId}?expand=ancestors` + const documentUrl = `${this.confluenceUrl}/rest/api/content/${documentId}?expand=ancestors,version` const document = await got(documentUrl, { username: this.confluenceUser, password: this.confluencePassword, diff --git a/test/MockServer.ts b/test/MockServer.ts index ee5aabf..574b885 100644 --- a/test/MockServer.ts +++ b/test/MockServer.ts @@ -197,7 +197,7 @@ export class MockServer { public addDocumentEndpoint(): void { this._scope - .get('/rest/api/content/123?expand=ancestors') + .get('/rest/api/content/123?expand=ancestors,version') .basicAuth({ user: 'nobody', pass: 'nothing', @@ -221,7 +221,7 @@ export class MockServer { }, title: 'Test', }) - .get('/rest/api/content/234?expand=ancestors') + .get('/rest/api/content/234?expand=ancestors,version') .basicAuth({ user: 'nobody', pass: 'nothing',