added possibility to filter datas

This commit is contained in:
Matthis FAUVET 2024-06-21 19:38:47 +02:00
parent b97ed0c1b8
commit 85b1c63219

View File

@ -75,25 +75,7 @@
this.artist_style = "isDeactivate"; this.artist_style = "isDeactivate";
this.song_style = "isDeactivate"; this.song_style = "isDeactivate";
}, },
} execQuery(table, filter = undefined, id = undefined){
</script>
<style>
.isActivate{
background-color: #6EE7B7;
border-color: #059669;
}
.isDeactivate {
background-color: #D1FAE5;
border-color: #6EE7B7;
}
.item {
background-color: #ECFDF5;
border-color: #6EE7B7;
width: 32%;
}
</style>
<script>
function execQuery(table, filter = undefined, id = undefined){
let baseHttpRequest = "https://dwarves.iut-fbleau.fr/~fauvet/api/" let baseHttpRequest = "https://dwarves.iut-fbleau.fr/~fauvet/api/"
let computeHttpRequest; let computeHttpRequest;
if(filter !== undefined){ if(filter !== undefined){
@ -111,6 +93,22 @@
return fetch(computeHttpRequest).then(response => { return fetch(computeHttpRequest).then(response => {
return response.json(); return response.json();
}); });
}; }
}
</script> </script>
<style>
.isActivate{
background-color: #6EE7B7;
border-color: #059669;
}
.isDeactivate {
background-color: #D1FAE5;
border-color: #6EE7B7;
}
.item {
background-color: #ECFDF5;
border-color: #6EE7B7;
width: 32%;
}
</style>
</onzer> </onzer>