diff --git a/front/components/admin/form.vue b/front/components/admin/form.vue index b85b738..402805b 100644 --- a/front/components/admin/form.vue +++ b/front/components/admin/form.vue @@ -34,7 +34,7 @@
- +
@@ -179,6 +179,13 @@ const image = computed(() => (index: number) => { return `https://image.tmdb.org/t/p/w500${foundFilms.value?.results[index].poster_path}` }) +const durationNoSecond = computed({ + get: () => film.value.duration, + set(value: string) { + film.value.duration = value.replace(/:\d{2}$/, ":00") + }, +}) + async function findFilm() { foundFilms.value = await $fetch("https://api.themoviedb.org/3/search/movie", { params: { diff --git a/front/composables/types.ts b/front/composables/types.ts index 5d2e86b..a1f52da 100644 --- a/front/composables/types.ts +++ b/front/composables/types.ts @@ -9,11 +9,11 @@ export enum LanguageSubtitles { export type Film = { id?: number - projectionDate?: Date + projectionDate?: string title?: string actors?: string[] director?: string - duration?: number + duration?: string synopsis?: string originCountry?: string releaseYear?: number