diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-02-27 16:18:47 +0900 |
|---|---|---|
| committer | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-02-27 17:39:23 +0900 |
| commit | 296a884fdf5457ed3dbb0f1b066b76fc053a78c9 (patch) | |
| tree | 14c896ce11530501d93bec007e2656e40803b689 /src/api/endpoints | |
| parent | Fix typo: Authetication -> Authentication (diff) | |
| download | sharkey-296a884fdf5457ed3dbb0f1b066b76fc053a78c9.tar.gz sharkey-296a884fdf5457ed3dbb0f1b066b76fc053a78c9.tar.bz2 sharkey-296a884fdf5457ed3dbb0f1b066b76fc053a78c9.zip | |
Clean up
Diffstat (limited to 'src/api/endpoints')
| -rw-r--r-- | src/api/endpoints/meta.js | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/api/endpoints/meta.js b/src/api/endpoints/meta.js index 88e7f64ddf..d3c5255445 100644 --- a/src/api/endpoints/meta.js +++ b/src/api/endpoints/meta.js @@ -23,10 +23,10 @@ import git from 'git-last-commit'; * commit: * description: latest commit's hash * type: string - * secure: + * secure: * description: whether the server supports secure protcols * type: boolean - * + * * default: * description: Failed * schema: @@ -40,13 +40,12 @@ import git from 'git-last-commit'; * @return {Promise<object>} */ module.exports = (params) => - new Promise(async (res, rej) => -{ - const commit = await prominence(git).getLastCommit(); + new Promise(async (res, rej) => { + const commit = await prominence(git).getLastCommit(); - res({ - maintainer: config.maintainer, - commit: commit.shortHash, - secure: config.https.enable + res({ + maintainer: config.maintainer, + commit: commit.shortHash, + secure: config.https.enable + }); }); -}); |