fix: format api data correctly
This commit is contained in:
@@ -23,8 +23,8 @@ export default async function(indexName, opts = {}) {
|
|||||||
|
|
||||||
// index all the data
|
// index all the data
|
||||||
const documents = records.map(rec => ({
|
const documents = records.map(rec => ({
|
||||||
transponder: rec[0],
|
transponder: `${rec[0]}`.toLowerCase(),
|
||||||
callsign: rec[1],
|
callsign: `${rec[1]}`.trim(),
|
||||||
origin_country: rec[2],
|
origin_country: rec[2],
|
||||||
time_position: new Date(rec[3] * 1000),
|
time_position: new Date(rec[3] * 1000),
|
||||||
last_contact: new Date(rec[4] * 1000),
|
last_contact: new Date(rec[4] * 1000),
|
||||||
|
|||||||
Reference in New Issue
Block a user