update rooms

This commit is contained in:
2024-05-13 18:12:59 +02:00
parent 1e3dcf340d
commit baf31f7959
10 changed files with 579 additions and 218 deletions

View File

@@ -5,7 +5,8 @@ import axios from "axios";
export const getRoom = async (_id) => {
try {
const response = await axios.get("/room/"+{_id});
let id = _id.toString()
const response = await axios.get(`/room/${id}`);
console.log(response.data)
return response.data;
} catch (error) {
@@ -57,7 +58,7 @@ function formatRoomStatsGlobal(global){
const most_expensive_room = {
name: global.most_expensive_room.name,
price: global.most_expensive_room.price
count: global.most_expensive_room.count
};
return {