1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-17 08:09:09 +09:00
MisskeyIO/src/api/endpoints/meta.js

25 lines
424 B
JavaScript
Raw Normal View History

2016-12-29 07:49:51 +09:00
'use strict';
/**
* Module dependencies
*/
import Git from 'nodegit';
/**
* Show core info
*
* @param {Object} params
* @return {Promise<object>}
*/
module.exports = (params) =>
new Promise(async (res, rej) =>
{
const repository = await Git.Repository.open(__dirname + '/../../');
res({
maintainer: config.maintainer,
commit: (await repository.getHeadCommit()).sha(),
secure: config.https.enable
});
});