fix: remove unnessary app info field

This commit is contained in:
Innei
2021-10-01 18:58:21 +08:00
parent 855492e476
commit c4cf9b3eb0

View File

@@ -25,23 +25,12 @@ export class AppController {
) {}
@Get(['/', '/info'])
async appInfo() {
let hash = ''
try {
await $`git log --pretty=oneline | head -n 1 | cut -d' ' -f1 | cat`
} catch (e: any) {
// HACK https://www.codenong.com/19120263/
if (e.exitCode == 141) {
hash = e.stdout.trim()
}
}
return {
name: PKG.name,
author: PKG.author,
version: PKG.version,
homepage: PKG.homepage,
issues: PKG.issues,
hash,
}
}