scale: Variable Global $urlG

This commit is contained in:
2024-12-06 17:33:40 -03:00
parent edaf8c6600
commit c8daa303e4
10 changed files with 65 additions and 54 deletions

View File

@@ -5,6 +5,8 @@
let { id, ubicacion, tipo, letra, piso,canthabitaciones, servicios, btnbaja = "Baja" } = $props();
import { urlG } from "../stores/urlStore";
let modal: boolean = $state(false);
let modalpayload: string = $state("");
@@ -17,7 +19,7 @@
async function BajaPropiedad(){
modal = false;
try {
const responce = await fetch("http://localhost:5007/api/propiedad?id="+id, {
const responce = await fetch(String($urlG)+"/api/propiedad?id="+id, {
method: "DELETE",
headers:{
'Auth' : String(sessionStorage.getItem("token")),