fix: remove unnessary app info field
This commit is contained in:
@@ -25,23 +25,12 @@ export class AppController {
|
|||||||
) {}
|
) {}
|
||||||
@Get(['/', '/info'])
|
@Get(['/', '/info'])
|
||||||
async appInfo() {
|
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 {
|
return {
|
||||||
name: PKG.name,
|
name: PKG.name,
|
||||||
author: PKG.author,
|
author: PKG.author,
|
||||||
version: PKG.version,
|
version: PKG.version,
|
||||||
homepage: PKG.homepage,
|
homepage: PKG.homepage,
|
||||||
issues: PKG.issues,
|
issues: PKG.issues,
|
||||||
hash,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user