chore: code formatting
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
//Imports
|
||||
import { Client as Gmap } from "@googlemaps/google-maps-services-js"
|
||||
import color from "color"
|
||||
import * as d3 from "d3"
|
||||
import D3Node from "d3-node"
|
||||
import color from "color"
|
||||
import {Client as Gmap} from "@googlemaps/google-maps-services-js"
|
||||
|
||||
/**
|
||||
* Worldmap
|
||||
@@ -33,7 +33,9 @@ export default async function (login, {locations, sample, imports, token}) {
|
||||
stars.set(code, (stars.get(code) ?? 0) + 1)
|
||||
}
|
||||
}
|
||||
else throw {error:{message:"Google Maps API token is not set"}}
|
||||
else {
|
||||
throw {error: {message: "Google Maps API token is not set"}}
|
||||
}
|
||||
|
||||
//Generate SVG
|
||||
const d3n = new D3Node()
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function({faker, query, login = faker.internet.userName()}) {
|
||||
cursor: "MOCKED_CURSOR",
|
||||
node: {
|
||||
location: faker.address.city(),
|
||||
}
|
||||
},
|
||||
})),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//Imports
|
||||
import { faker } from "@faker-js/faker"
|
||||
import { Client as Gmap } from "@googlemaps/google-maps-services-js"
|
||||
import axios from "axios"
|
||||
import fs from "fs/promises"
|
||||
import paths from "path"
|
||||
import rss from "rss-parser"
|
||||
import urls from "url"
|
||||
import {Client as Gmap} from "@googlemaps/google-maps-services-js"
|
||||
|
||||
//Mocked state
|
||||
let mocked = false
|
||||
@@ -167,32 +167,32 @@ export default async function({graphql, rest}) {
|
||||
{
|
||||
long_name: city,
|
||||
short_name: city,
|
||||
types: [ "political" ]
|
||||
types: ["political"],
|
||||
},
|
||||
{
|
||||
long_name: country,
|
||||
short_name: faker.address.countryCode(),
|
||||
types: [ "country", "political" ]
|
||||
}
|
||||
types: ["country", "political"],
|
||||
},
|
||||
],
|
||||
formatted_address: `${city}, ${country}`,
|
||||
geometry: {
|
||||
bounds: {
|
||||
northeast: {lat, lng},
|
||||
southwest: { lat, lng }
|
||||
southwest: {lat, lng},
|
||||
},
|
||||
location: {lat, lng},
|
||||
location_type: "APPROXIMATE",
|
||||
viewport: {
|
||||
northeast: {lat, lng},
|
||||
southwest: { lat, lng }
|
||||
}
|
||||
southwest: {lat, lng},
|
||||
},
|
||||
},
|
||||
place_id: "ChIJu9FC7RXupzsR26dsAapFLgg",
|
||||
types: ["locality", "political"],
|
||||
},
|
||||
],
|
||||
},
|
||||
place_id: 'ChIJu9FC7RXupzsR26dsAapFLgg',
|
||||
types: [ "locality", "political" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user