[API]Fix /meta

This commit is contained in:
Tosuke 2017-01-06 22:03:12 +09:00
parent 4d8247eb27
commit 1e010ac367

View File

@ -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
});
});