From 40043f0293450e2b1ad81f0f19c1fc0d43082a34 Mon Sep 17 00:00:00 2001 From: Fauvet Matthis Date: Fri, 21 Jun 2024 00:21:46 +0200 Subject: [PATCH] Async request --- index.html | 6 ++++-- model.js | 5 +++++ onzer.riot | 14 +++++++------- 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 model.js diff --git a/index.html b/index.html index de64a60..1311932 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,9 @@ Riot App + - + @@ -13,10 +14,11 @@ + diff --git a/model.js b/model.js new file mode 100644 index 0000000..1ae6ac5 --- /dev/null +++ b/model.js @@ -0,0 +1,5 @@ +function getSongs(){ + return fetch(`https://dwarves.iut-fbleau.fr/~fauvet/api/songs`).then(response => { + return response; + }) +} \ No newline at end of file diff --git a/onzer.riot b/onzer.riot index 38eebb2..ed62ea2 100644 --- a/onzer.riot +++ b/onzer.riot @@ -16,15 +16,16 @@ - \ No newline at end of file