adding rooms

This commit is contained in:
2026-03-19 01:42:59 +00:00
parent ceb907b975
commit 285a734ca0
8 changed files with 121 additions and 15 deletions

View File

@@ -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>