Showing
2 changed files
with
11 additions
and
0 deletions
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | - Ajout fichier .prettierignore. | 2 | - Ajout fichier .prettierignore. |
| 3 | - Installation module vuetify + modif script lint dans package.json. | 3 | - Installation module vuetify + modif script lint dans package.json. |
| 4 | - Installation de lucide-vue-next pour librairie d'icônes. | 4 | - Installation de lucide-vue-next pour librairie d'icônes. |
| 5 | +- Ajout composable tMDB. | ||
| 5 | 6 | ||
| 6 | 0.1.1: | 7 | 0.1.1: |
| 7 | - Installation et configuration d'eslint et prettier. | 8 | - Installation et configuration d'eslint et prettier. |
composables/tMDB.ts
0 → 100644
| 1 | +import type { RuntimeConfig } from "nuxt/schema"; | ||
| 2 | + | ||
| 3 | +export const useTMDB = function() { | ||
| 4 | + const runtimeconfig: RuntimeConfig = useRuntimeConfig(); | ||
| 5 | + | ||
| 6 | + const apiUrl = runtimeconfig.public.apiTMDBUrl; | ||
| 7 | + const apiKey = runtimeconfig.public.apiTMDBSecret; | ||
| 8 | + | ||
| 9 | + return {apiUrl, apiKey} | ||
| 10 | +} |
-
Please register or login to post a comment