adding rooms
This commit is contained in:
@@ -6,8 +6,7 @@ const rooms = ref();
|
||||
defineEmits(['addSlot']);
|
||||
onBeforeMount(async () => {
|
||||
const res = await fetch("http://localhost:3000/currentRooms", {
|
||||
method: "GET",
|
||||
headers: new Headers({'content-type': 'application/json'})
|
||||
method: "GET"
|
||||
});
|
||||
rooms.value = await res.json();
|
||||
});
|
||||
@@ -19,6 +18,7 @@ onBeforeMount(async () => {
|
||||
</header>
|
||||
<article v-if="rooms">
|
||||
<h2>Free Rooms:</h2>
|
||||
{{ rooms.records }}
|
||||
<p v-if="rooms.records.length == 0">No free rooms right now</p>
|
||||
<ul v-for="(slot, index) in rooms.records">
|
||||
<li :id="index">{{ slot }}</li>
|
||||
|
||||
Reference in New Issue
Block a user