Commit 20c51c4 1 parent b8b2c87 commit 20c51c4 Copy full SHA for 20c51c4
File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -136,10 +136,10 @@ async function fetchData() {
136
136
] )
137
137
}
138
138
139
- async function fetchDayMap ( { now, limitedHosts, hostsData } ) {
139
+ async function fetchDayMap ( { now, limitedHosts, fetchData } ) {
140
140
return Promise . all ( [
141
141
getAllDayMap ( now ) ,
142
- getHostsDayMap ( limitedHosts , hostsData ) ,
142
+ getHostsDayMap ( limitedHosts , fetchData [ 4 ] ) ,
143
143
getPast5MinuteMap ( now ) ,
144
144
] )
145
145
}
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ module.exports = async (ctx) => {
13
13
const data = await fetchData ( )
14
14
// All
15
15
const all = { }
16
- all . now = fetchData [ 0 ] || 0
17
- all . past_minute = fetchData [ 1 ]
18
- all . past_hour = fetchData [ 2 ]
19
- all . past_day = fetchData [ 3 ]
16
+ all . now = data [ 0 ] || 0
17
+ all . past_minute = data [ 1 ]
18
+ all . past_hour = data [ 2 ]
19
+ all . past_day = data [ 3 ]
20
20
// Hosts
21
21
const [ [ hosts , limitedHosts ] , hitokoto ] = await Promise . all ( [
22
22
genHostsWithValidHostList ( data ) ,
@@ -27,7 +27,6 @@ module.exports = async (ctx) => {
27
27
now : all . now ,
28
28
fetchData : data ,
29
29
limitedHosts,
30
- hostsData : fetchData [ 4 ] ,
31
30
} )
32
31
all . day_map = dayMap [ 0 ]
33
32
all . five_minutes_map = fetchDayMap [ 2 ]
You can’t perform that action at this time.
0 commit comments