summaryrefslogtreecommitdiff
path: root/src/server/web/index.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-06-20 22:52:35 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-06-20 22:52:35 +0900
commit2c1932faa72ef6f2c30df62e5b3248f2c0b77948 (patch)
treec9ea3f78f3f0118198783b97fbdaf66590655b25 /src/server/web/index.ts
parentFix code style (diff)
downloadsharkey-2c1932faa72ef6f2c30df62e5b3248f2c0b77948.tar.gz
sharkey-2c1932faa72ef6f2c30df62e5b3248f2c0b77948.tar.bz2
sharkey-2c1932faa72ef6f2c30df62e5b3248f2c0b77948.zip
Add psql version to info page
Diffstat (limited to 'src/server/web/index.ts')
-rw-r--r--src/server/web/index.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/web/index.ts b/src/server/web/index.ts
index c5a3497f44..ba8f0649cf 100644
--- a/src/server/web/index.ts
+++ b/src/server/web/index.ts
@@ -20,6 +20,7 @@ import { Users, Notes, Emojis, UserProfiles, Pages } from '../../models';
import parseAcct from '../../misc/acct/parse';
import getNoteSummary from '../../misc/get-note-summary';
import { ensure } from '../../prelude/ensure';
+import { getConnection } from 'typeorm';
const client = `${__dirname}/../../client/`;
@@ -250,6 +251,7 @@ router.get('/info', async ctx => {
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,
cores: os.cpus().length