dernier slide
This commit is contained in:
parent
0bd89f30f0
commit
f540d03c1d
Binary file not shown.
@ -4,6 +4,7 @@ import fetch from "node-fetch";
|
||||
import { v4 as uuid } from "uuid";
|
||||
|
||||
const db = new Database("weathery.db");
|
||||
const APPID = "d6f0f985f37372e9824c68a52662cc23";
|
||||
|
||||
const app = fastify({
|
||||
logger: true,
|
||||
@ -36,7 +37,7 @@ app.get("/", async () => {
|
||||
locations.map(async (location) => {
|
||||
const { lat, lon } = location;
|
||||
const { weather, main: properties } = await fetch(
|
||||
`https://api.openweathermap.org/data/2.5/weather?lat=${lat}&lon=${lon}&appid=d6f0f985f37372e9824c68a52662cc23&units=metric`
|
||||
`https://api.openweathermap.org/data/2.5/weather?lat=${lat}&lon=${lon}&appid=${APPID}&units=metric`
|
||||
).then((r) => r.json());
|
||||
|
||||
return {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user