diff --git a/frontend/src/__apps/painel/main.js b/frontend/src/__apps/painel/main.js index 89e0a7a17..9c9b4633f 100644 --- a/frontend/src/__apps/painel/main.js +++ b/frontend/src/__apps/painel/main.js @@ -88,9 +88,14 @@ const v = new Vue({ // eslint-disable-line } return texto }, + converterUrl (url) { + url = url.slice(-4) + url = '/painel/' + url + '/dados' + return url + }, fetchData () { // TODO: how to get no hardcoded URL? - $.get('/painel/2867/dados', function (response) { + $.get(this.converterUrl(window.location.pathname), function (response) { this.brasao = response.brasao this.painel_aberto = response.status_painel this.sessao_finalizada = response.sessao_finalizada