From 82d091b28a6927bb5d86069d0dca94e1b8fc99ab Mon Sep 17 00:00:00 2001 From: valere Date: Thu, 10 Oct 2024 17:22:39 +0200 Subject: [PATCH] FEAT: use native fetch 2 --- nuxt.config.ts | 4 +++- server/api/details/[id].ts | 2 -- server/api/explore/[page].ts | 2 -- server/api/search/[termspage].ts | 2 -- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index bb84619..c0c9b42 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -27,6 +27,8 @@ export default defineNuxtConfig({ IMG_BASE_URL: 'https://media.themoviedb.org/t/p/w220_and_h330_face/', } }, - + typescript: { + typeCheck: true + }, compatibilityDate: '2024-10-06', }) diff --git a/server/api/details/[id].ts b/server/api/details/[id].ts index 79e7cc7..46d3a7e 100644 --- a/server/api/details/[id].ts +++ b/server/api/details/[id].ts @@ -1,5 +1,3 @@ -import fetch from 'node-fetch' - export default eventHandler(async (req) => { const id = req.context.params?.id || '' const url = `https://api.themoviedb.org/3/movie/${id}?language=fr-FR` diff --git a/server/api/explore/[page].ts b/server/api/explore/[page].ts index ff6ad08..10256f8 100644 --- a/server/api/explore/[page].ts +++ b/server/api/explore/[page].ts @@ -1,5 +1,3 @@ -import fetch from 'node-fetch' - export default eventHandler(async (req) => { const page = req.context.params?.page || 1 const url = `https://api.themoviedb.org/3/discover/movie?include_adult=false&include_video=false&language=en-US&page=${page}&sort_by=popularity.desc` diff --git a/server/api/search/[termspage].ts b/server/api/search/[termspage].ts index dae39a9..54315cd 100644 --- a/server/api/search/[termspage].ts +++ b/server/api/search/[termspage].ts @@ -1,5 +1,3 @@ -import fetch from 'node-fetch' - interface Film { title: string, seed: number,