增加每日接单排行榜
This commit is contained in:
@@ -1202,11 +1202,13 @@ export async function listWorkerHallOrders(query: JsonObject = {}, session: Work
|
||||
}
|
||||
}
|
||||
|
||||
export async function getWorkerHallLeaderboard(session: WorkerSession) {
|
||||
export async function getWorkerHallLeaderboard(session: WorkerSession, period: unknown = 'all') {
|
||||
requireActiveWorkerSession(session)
|
||||
const leaderboardPeriod = period === 'daily' ? 'daily' : 'all'
|
||||
const entries = await listWorkerCompletionLeaderboard({
|
||||
limit: 10,
|
||||
currentWorkerId: session.workerId,
|
||||
period: leaderboardPeriod,
|
||||
})
|
||||
const current = entries.find((entry) => entry.workerId === session.workerId)
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user