|
|
|
@ -24,12 +24,14 @@ function prepareData(data) { |
|
|
|
return ""; |
|
|
|
}; |
|
|
|
|
|
|
|
const utc = data.utc | 0; |
|
|
|
|
|
|
|
for (const srvId of Object.keys(data.lastplay)) { |
|
|
|
const obj = {}; |
|
|
|
obj.srv_id = srvId; |
|
|
|
obj.server_name = data.servers[srvId].name; |
|
|
|
obj.lastplay = grabFirstValue(data.lastplay[srvId]); |
|
|
|
obj.lastplay_moment = moment.unix(obj.lastplay).format("DD-MM-YYYY HH:mm"); |
|
|
|
obj.lastplay_moment = moment.unix(obj.lastplay + utc).format("DD-MM-YYYY HH:mm"); |
|
|
|
obj.gametime = grabFirstValue(data.gametime[srvId]); |
|
|
|
obj.map_name = grabMapName(data.lastplay[srvId]); |
|
|
|
result.push(obj); |
|
|
|
|