详情页时间字段改北京时间 Y-m-d H:i:s 格式(抓取/更新/打招呼时间)
This commit is contained in:
@@ -197,6 +197,10 @@ app.get('/api/candidates/:id', requireAuth, (req, res) => {
|
||||
raw_text, education_detail, work_detail, cert_detail, score_details, notes, scraped_at, updated_at
|
||||
FROM candidates WHERE id = ?`).get(req.params.id);
|
||||
if (!row) return res.status(404).json({ error: '不存在' });
|
||||
const bj = (s) => s ? new Date(new Date(s).getTime() + 8 * 3600e3).toISOString().slice(0, 19).replace('T', ' ') : s;
|
||||
row.scraped_at = bj(row.scraped_at);
|
||||
row.updated_at = bj(row.updated_at);
|
||||
if (row.greeted_at) row.greeted_at = bj(row.greeted_at);
|
||||
res.json(row);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user