From bb52ebdc3eb53db826e488ff50af04478edc50cb Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 18 Jun 2019 15:56:03 +0900 Subject: [PATCH] Provide version of postgresql --- src/client/app/common/views/widgets/server.info.vue | 1 + src/server/api/endpoints/meta.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/client/app/common/views/widgets/server.info.vue b/src/client/app/common/views/widgets/server.info.vue index a97b4ec49..41ccd23bf 100644 --- a/src/client/app/common/views/widgets/server.info.vue +++ b/src/client/app/common/views/widgets/server.info.vue @@ -3,6 +3,7 @@

Maintainer: {{ meta.maintainerName }}

Machine: {{ meta.machine }}

Node: {{ meta.node }}

+

PSQL: {{ meta.psql }}

Version: {{ meta.version }}

diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index d18543f56..4da0c7476 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -6,6 +6,7 @@ import { fetchMeta } from '../../../misc/fetch-meta'; import * as pkg from '../../../../package.json'; import { Emojis } from '../../../models'; import { types, bool } from '../../../misc/schema'; +import { getConnection } from 'typeorm'; export const meta = { stability: 'stable', @@ -114,6 +115,7 @@ export default define(meta, async (ps, me) => { machine: os.hostname(), os: os.platform(), node: process.version, + psql: await getConnection().query('SHOW server_version').then(x => x[0].server_version), cpu: { model: os.cpus()[0].model,