fix [front]: WIP fill with TMDB values
This commit is contained in:
parent
7952c2a041
commit
ebc0af117b
2 changed files with 9 additions and 2 deletions
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue