From 8dd6fdaa15149f1741eeabaad408e17305765419 Mon Sep 17 00:00:00 2001 From: Fluffy Date: Mon, 13 May 2024 12:19:11 +0100 Subject: [PATCH] Template Literals --- front/src/lib/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/lib/api.ts b/front/src/lib/api.ts index 4b69c00..a698a2d 100644 --- a/front/src/lib/api.ts +++ b/front/src/lib/api.ts @@ -4,7 +4,7 @@ import TestData from "./test-data"; const API_URL = "http://127.0.0.1:8080"; export async function getPopularToday(): Promise { - const response = await fetch(API_URL + "/api/items"); + const response = await fetch( `${API_URL}/api/items`); const { data, error }: JSONResponse = await response.json(); if (response.ok) {