diff options
| author | Tosuke <tasukeprg@gmail.com> | 2017-01-06 22:03:12 +0900 |
|---|---|---|
| committer | Tosuke <tasukeprg@gmail.com> | 2017-01-06 22:03:12 +0900 |
| commit | 2a383e8d53c64a80c3355f1d15f8c7a90cdac70d (patch) | |
| tree | d874d314e92c78ff97002ce03d8a1417aa0a2f08 /src/api/endpoints | |
| parent | Add ignore file (diff) | |
| download | sharkey-2a383e8d53c64a80c3355f1d15f8c7a90cdac70d.tar.gz sharkey-2a383e8d53c64a80c3355f1d15f8c7a90cdac70d.tar.bz2 sharkey-2a383e8d53c64a80c3355f1d15f8c7a90cdac70d.zip | |
[API]Fix /meta
Diffstat (limited to 'src/api/endpoints')
| -rw-r--r-- | src/api/endpoints/meta.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/api/endpoints/meta.js b/src/api/endpoints/meta.js index 7938cb91b4..acbe43a54d 100644 --- a/src/api/endpoints/meta.js +++ b/src/api/endpoints/meta.js @@ -3,7 +3,8 @@ /** * Module dependencies */ -import Git from 'nodegit'; +import prominence from 'prominence'; +import git from 'git-last-commit'; /** * Show core info @@ -14,11 +15,11 @@ import Git from 'nodegit'; module.exports = (params) => new Promise(async (res, rej) => { - const repository = await Git.Repository.open(__dirname + '/../../'); + const commit = await prominence(git).getLastCommit(); res({ maintainer: config.maintainer, - commit: (await repository.getHeadCommit()).sha(), + commit: commit.shortHash, secure: config.https.enable }); }); |