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

@@ -4,15 +4,18 @@
import { writable } from 'svelte/store';
import './css/popup.css';
import type { Grupo } from "../types";
let isOpen: boolean = $state(false);
import { urlG } from "../stores/urlStore";
let isOpen: boolean = $state(false);
const permisos = writable<Grupo[]>([]);
const email = localStorage.getItem('email');
const token = sessionStorage.getItem('token');
async function obtenerPermisos(){
try {
const response = await fetch("http://localhost:5007/api/acciones",{
const response = await fetch(String($urlG)+"/api/acciones",{
method: 'GET',
headers: {
'Auth' : String(token),