perf(admin): change admin summary days from 7 to 14

pull/105/head
moonrailgun 2 years ago
parent f943edf3fe
commit 94090e6664

@ -56,8 +56,8 @@ if (process.env.NODE_ENV === 'production') {
}); });
} }
ViteExpress.listen(app, port, () => ViteExpress.listen(app, port, () => {
console.log( console.log(
`Server is listening on port ${port}, visit with: http://localhost:${port}/admin/` `Server is listening on port ${port}, visit with: http://localhost:${port}/admin/`
) );
); });

@ -50,8 +50,8 @@ router.use('/file', fileRouter);
router.use('/cache', cacheRouter); router.use('/cache', cacheRouter);
router.get('/user/count/summary', auth(), async (req, res) => { router.get('/user/count/summary', auth(), async (req, res) => {
// 返回最近7天的用户数统计 // 返回最近14天的用户数统计
const day = 7; const day = 14;
const aggregateRes: { count: number; date: string }[] = await userModel const aggregateRes: { count: number; date: string }[] = await userModel
.aggregate([ .aggregate([
{ {
@ -177,8 +177,8 @@ router.delete('/messages/:id', auth(), async (req, res) => {
}); });
router.get('/message/count/summary', auth(), async (req, res) => { router.get('/message/count/summary', auth(), async (req, res) => {
// 返回最近7天的消息数统计 // 返回最近14天的消息数统计
const day = 7; const day = 14;
const aggregateRes: { count: number; date: string }[] = await messageModel const aggregateRes: { count: number; date: string }[] = await messageModel
.aggregate([ .aggregate([
{ {

Loading…
Cancel
Save