Skip to content

Commit bae8d8e

Browse files
Merge pull request #9 from zeroidentidad/wip-challenges
front mod
2 parents 54534b4 + 5100321 commit bae8d8e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

webservice/frontend/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h2>Envía un challenge al Gopherbot</h2>
7171
<li><b>.go ayuda</b> - ver comandos generales disponibles</li>
7272
<li><b>.go libros</b> - enlaces de libros</li>
7373
<li><b>.go recursos</b> - enlaces de recursos</li>
74-
<li><b>.go challenges</b> - pedir desafios para practicar (en desarrollo)</li>
74+
<li><b>.go challenge</b> - pedir desafios para practicar (en desarrollo)</li>
7575
<li>...</li>
7676
<li><b>Server:</b>
7777
<a class="alink" href="https://discord.io/go-latam" target="_blank">https://discord.io/go-latam</a>

webservice/frontend/js/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// simple ajax post
22
$(document).ready(function () {
3+
Notification.requestPermission().then((res) => { console.log(res); });
34
let path=window.location.protocol+'//'+window.location.hostname+':'+window.location.port;
45
$("form").submit(function (e) {
56
let description=$("#description").val();
@@ -19,10 +20,9 @@ $(document).ready(function () {
1920
data: formData,
2021
dataType: "json",
2122
encode: true,
22-
}).done(function (data) {
23-
// log response
24-
console.log("Response ok:", data);
25-
alert("Desafio recibido y guardado correctamente 😎");
23+
}).done(function (res) {
24+
console.log(res);
25+
new Notification("Desafio recibido y guardado correctamente 😎");
2626
});
2727
} else {
2828
alert("No se estan mandando valores válidos")

0 commit comments

Comments
 (0)