fix [front]: WIP fill with TMDB values
This commit is contained in:
parent
7952c2a041
commit
ebc0af117b
|
@ -149,7 +149,9 @@
|
|||
</div>
|
||||
<div class="list-item-controls">
|
||||
<div class="buttons is-right">
|
||||
<button class="button">Préremplir</button>
|
||||
<button class="button" @click="fill(foundFilm.id)">
|
||||
Préremplir
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -191,6 +193,11 @@ async function findFilm() {
|
|||
await apiGet("tmdb/search/", { query: film.value.title })
|
||||
).data.value
|
||||
}
|
||||
|
||||
async function fill(tmdbId: number) {
|
||||
film.value = (await apiGet(`tmdb/${tmdbId}/fill/`)).data.value
|
||||
// TODO fix form reactivity
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
|
|
Loading…
Reference in a new issue