source: ReserveNGo-frontend/src/components/Project/favourite_locals.vue@ c3d3266

Last change on this file since c3d3266 was c3d3266, checked in by Aleksandarj03 <138524804+Aleksandarj03@…>, 3 months ago

Ne rabote fetcho

  • Property mode set to 100644
File size: 683 bytes
Line 
1<script>
2import { userStore } from '@/PiniaStores/UserStore.js'
3export default {
4 data() {
5 return {
6 locals:[],
7 userStore_:userStore(),
8 }
9 },
10 beforeMount() {
11 fetch(`http://localhost:8080/api/customer/favourite-locals`,{
12 method: 'GET',
13 headers: {
14 'Authorization': this.userStore_.getToken
15 }
16 })
17 .then(res => res.json())
18 .then(data => this.locals = data)
19 .catch(err => console.log(err))
20 },
21}
22</script>
23
24<template>
25 <div id="container " class="border container-xxl" v-for="local in locals" :key="local">
26 <h3>{{local.name}}</h3>
27 <h3>{{local.address}}</h3>
28 </div>
29</template>
30
31<style scoped></style>
Note: See TracBrowser for help on using the repository browser.