Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
agetic
sitio-firebase
Commits
59ffa154
Commit
59ffa154
authored
Mar 18, 2020
by
Ivan Tancara
Browse files
Merge branch 'master' of gitlab.agetic.gob.bo:dbarra/sitio-firebase
parents
64ebecf7
4bbb5f61
Changes
3
Hide whitespace changes
Inline
Side-by-side
INSTALL.md
View file @
59ffa154
...
...
@@ -12,3 +12,7 @@ Ejecutar el backend con pm2:
La aplicacion estara escuchando en el puerto 5000
FRONTEND
Cambiar la linea 9 del archivo index.html por la ruta del backend expuesto en produccion actualmente esta apuntando a https://boliviasegura.gob.bo/admin-api/
\ No newline at end of file
README.md
deleted
100644 → 0
View file @
64ebecf7
# FRONTEND
#### Cambiar la linea 9 del archivo index.html por la url que sera el backend en produccion
#### Ejemplo de URL
## var url = 'https://test.agetic.gob.bo/backend-api/send'
\ No newline at end of file
frontend/index.html
View file @
59ffa154
...
...
@@ -6,7 +6,7 @@
<title>
.:: Sitio ::.
</title>
<link
rel=
"stylesheet"
href=
"./style.css"
>
<script
type=
"text/javascript"
>
var
baseURL
=
'
http://
localhost:5000
'
;
var
baseURL
=
'
http
s
://
boliviasegura.gob.bo/admin-api
'
;
function
login
()
{
service
(
baseURL
+
'
/login
'
,
{
usuario
:
document
.
getElementById
(
'
user
'
).
value
,
...
...
@@ -18,7 +18,9 @@
document
.
getElementById
(
'
login
'
).
style
.
display
=
'
none
'
;
document
.
getElementById
(
'
data
'
).
style
.
display
=
'
block
'
;
}
else
{
alert
(
'
Datos incorrectos
'
);
document
.
getElementById
(
'
user
'
).
value
=
''
;
document
.
getElementById
(
'
password
'
).
value
=
''
;
alert
(
'
Credenciales incorrectas
'
);
}
});
}
...
...
@@ -29,6 +31,7 @@
cache
:
'
no-cache
'
,
credentials
:
'
same-origin
'
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
window
.
localStorage
.
getItem
(
'
site_token
'
),
'
Content-Type
'
:
'
application/json
'
},
redirect
:
'
follow
'
,
...
...
@@ -43,7 +46,17 @@
text
:
document
.
querySelector
(
'
#description
'
).
value
})
.
then
((
data
)
=>
{
alert
(
'
Mensaje enviado
'
);
if
(
data
.
finalizado
)
{
document
.
querySelector
(
'
#title
'
).
value
=
''
;
document
.
querySelector
(
'
#description
'
).
value
=
''
;
alert
(
'
Mensaje enviado
'
);
}
else
{
alert
(
'
El token expiro, por favor vuelva a loguearse
'
);
document
.
getElementById
(
'
user
'
).
value
=
''
;
document
.
getElementById
(
'
password
'
).
value
=
''
;
document
.
getElementById
(
'
login
'
).
style
.
display
=
'
block
'
;
document
.
getElementById
(
'
data
'
).
style
.
display
=
'
none
'
;
}
});
}
</script>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment