mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 08:23:09 +02:00
[API]Fix /meta
This commit is contained in:
parent
414cc5c2a8
commit
2a383e8d53
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue