diff --git a/app/api/server/lib/getServerInfo.ts b/app/api/server/lib/getServerInfo.ts index 9d9d46cffea8..62cc07052946 100644 --- a/app/api/server/lib/getServerInfo.ts +++ b/app/api/server/lib/getServerInfo.ts @@ -8,7 +8,7 @@ type ServerInfo = { version: string | undefined; }; -const removePatchInfo = (version: string): string => version.replace(/(\d+\.\d+).*/, '$1'); +const removePatchInfo = (version: string): string => version.replace(/(\d+\.\d+\.\d+).*/, '$1'); export async function getServerInfo(userId?: string): Promise { if (await hasRoleAsync(userId, 'admin')) { diff --git a/tests/end-to-end/api/00-miscellaneous.js b/tests/end-to-end/api/00-miscellaneous.js index 6dc6b084ae44..1159a0228037 100644 --- a/tests/end-to-end/api/00-miscellaneous.js +++ b/tests/end-to-end/api/00-miscellaneous.js @@ -35,7 +35,7 @@ describe('miscellaneous', function() { .expect((res) => { expect(res.body).to.have.property('version'); expect(res.body).to.not.have.property('info'); - expect(res.body.version).to.be.equal(version.replace(/(\d+\.\d+).*/, '$1')); + expect(res.body.version).to.be.equal(version.replace(/(\d+\.\d+\.\d+).*/, '$1')); }) .end(done); });