mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: modify analytics
This commit is contained in:
1 parent
61f627b125
commit
3e7092dbd6
3 files changed
+9
-4
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable object-shorthand */
|
||||
/* eslint-disable func-names */
|
||||
import { UserProfile, Quest } from '@linux-odyssey/models'
|
||||
import { UserProfile } from '@linux-odyssey/models'
|
||||
|
||||
export function totalQuests() {
|
||||
return UserProfile.aggregate([
|
||||
@@ -98,7 +98,7 @@ export function questList() {
|
||||
else: {
|
||||
$round: [
|
||||
{ $multiply: [{ $divide: ['$completed', '$started'] }, 100] },
|
||||
2,
|
||||
0,
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -107,7 +107,7 @@ export function questList() {
|
||||
},
|
||||
{
|
||||
$sort: {
|
||||
_id: 1, // 按任务ID升序排序
|
||||
completed: -1,
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user