修复登录报错提示内容错误,增加节假日同步功能
This commit is contained in:
@@ -20,6 +20,15 @@ router.get('/project-types', (req, res) => {
|
||||
res.json({ code: 200, data: db.all('SELECT id, name FROM project_types ORDER BY id') });
|
||||
});
|
||||
|
||||
// GET /api/rd/holidays — retrieve holiday data for a specific year
|
||||
router.get('/holidays', async (req, res) => {
|
||||
const db = getDB(req);
|
||||
const year = parseInt(req.query.year) || new Date().getFullYear();
|
||||
const { getHolidays } = require('../utils/holiday');
|
||||
const holidayMap = await getHolidays(db, year);
|
||||
res.json({ code: 200, data: holidayMap || {} });
|
||||
});
|
||||
|
||||
// GET /api/rd/timesheets?date=YYYY-MM-DD or ?month=YYYY-MM
|
||||
router.get('/timesheets', (req, res) => {
|
||||
const db = getDB(req);
|
||||
|
||||
Reference in New Issue
Block a user