feat: Suppression de code inutil
This commit is contained in:
parent
e2d263887d
commit
4a3578b8ff
20
src/api.js
20
src/api.js
|
@ -1,20 +0,0 @@
|
||||||
const apiUrl = "https://admin.ceiba-conseil.com";
|
|
||||||
|
|
||||||
export async function fetchJSONApi(path) {
|
|
||||||
const url = `${apiUrl}${path}`;
|
|
||||||
const options = {
|
|
||||||
method: "GET",
|
|
||||||
headers: {
|
|
||||||
"content-type": "application/json",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
console.log(`fetchJSONApi: ${url}`);
|
|
||||||
const response = await fetch(url, options);
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
const errors = await response.json();
|
|
||||||
throw errors.errors[0].message;
|
|
||||||
}
|
|
||||||
|
|
||||||
return response.json();
|
|
||||||
}
|
|
|
@ -59,7 +59,7 @@ function formatScore(score) {
|
||||||
|
|
||||||
const title = score ? score.title : "";
|
const title = score ? score.title : "";
|
||||||
const questions = ref(formatScore(score));
|
const questions = ref(formatScore(score));
|
||||||
console.log(questions.value);
|
|
||||||
function nextQuestion() {
|
function nextQuestion() {
|
||||||
setTimeout(() => slides.value.go(">"), 100);
|
setTimeout(() => slides.value.go(">"), 100);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue