任务列表:归档折叠 + 游标分页 + 关键词搜索;设置页版本号精简
This commit is contained in:
@@ -12,8 +12,8 @@ const router = express.Router();
|
||||
const STARTED_AT = Date.now();
|
||||
let VERSION = '2.0.0';
|
||||
try { VERSION = require('../../package.json').version || VERSION; } catch (_) {}
|
||||
// 附带 git 提交号(post-commit 钩子自动生成),免去手动改版本号
|
||||
if (versionInfo.commit) VERSION += '+' + versionInfo.commit;
|
||||
// git 提交号单独返回(提交时 post-commit 钩子自动生成),前端只显示简洁版本号
|
||||
const VERSION_COMMIT = versionInfo.commit || '';
|
||||
|
||||
function sendErr(res, err) {
|
||||
const code = err && err.status_code || 500;
|
||||
@@ -31,6 +31,7 @@ router.get('/status', wrap((req, res) => {
|
||||
res.json({
|
||||
ok: true,
|
||||
version: VERSION,
|
||||
version_commit: VERSION_COMMIT,
|
||||
version_date: versionInfo.date,
|
||||
pid: process.pid,
|
||||
node: process.version,
|
||||
|
||||
Reference in New Issue
Block a user