fix: remove unnessary app info field
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user