1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-28 21:48:08 +09:00
hotomoe/src/api/endpoints/meta.js
2017-01-06 22:03:12 +09:00

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