fix [front]: WIP fill with TMDB values

This commit is contained in:
Alice 2022-06-10 01:37:13 +02:00
parent 7952c2a041
commit ebc0af117b
2 changed files with 9 additions and 2 deletions

View file

@ -149,7 +149,9 @@
</div> </div>
<div class="list-item-controls"> <div class="list-item-controls">
<div class="buttons is-right"> <div class="buttons is-right">
<button class="button">Préremplir</button> <button class="button" @click="fill(foundFilm.id)">
Préremplir
</button>
</div> </div>
</div> </div>
</div> </div>
@ -191,6 +193,11 @@ async function findFilm() {
await apiGet("tmdb/search/", { query: film.value.title }) await apiGet("tmdb/search/", { query: film.value.title })
).data.value ).data.value
} }
async function fill(tmdbId: number) {
film.value = (await apiGet(`tmdb/${tmdbId}/fill/`)).data.value
// TODO fix form reactivity
}
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>

View file

@ -1,5 +1,5 @@
<template> <template>
<!-- TODO add menu --> <!-- TODO add menu -->
<div class="container"><slot /></div> <div class="container"><slot /></div>
</template> </template>