Simplified Ivago API wrapper in frontend
This commit is contained in:
parent
4b3ae8a9a4
commit
f27775910f
3 changed files with 15 additions and 30 deletions
|
|
@ -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 = ""
|
||||
|
|
|
|||
Reference in a new issue