monkeeShark/src/api/endpoints/meta.js
2017-01-06 22:03:12 +09:00

25 lines
430 B
JavaScript

'use strict';
/**
* Module dependencies
*/
import prominence from 'prominence';
import git from 'git-last-commit';
/**
* Show core info
*
* @param {Object} params
* @return {Promise<object>}
*/
module.exports = (params) =>
new Promise(async (res, rej) =>
{
const commit = await prominence(git).getLastCommit();
res({
maintainer: config.maintainer,
commit: commit.shortHash,
secure: config.https.enable
});
});