mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-18 16:07:31 -07:00
25 lines
424 B
JavaScript
25 lines
424 B
JavaScript
|
'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
|
||
|
});
|
||
|
});
|