Simplified Ivago API wrapper in frontend

This commit is contained in:
Jef Roosens 2021-04-30 00:24:19 +02:00
parent 4b3ae8a9a4
commit f27775910f
Signed by: Jef Roosens
GPG key ID: B580B976584B5F30
3 changed files with 15 additions and 30 deletions

View file

@ -11,7 +11,7 @@
<script lang="ts">
import { defineComponent } from 'vue'
import { Street, Ivago } from '../api/ivago'
import { Street, search } from '../api/ivago'
export default defineComponent({
name: 'Ivago',
@ -32,8 +32,7 @@ export default defineComponent({
return
}
new Ivago(import.meta.env.VITE_ENDPOINT as string)
.search(this.query)
search(this.query)
.then((res: Street[]) => {
this.items = res
this.msg = ""