From bc2c76d21be771b56c32d8413840e4fabf4f68c5 Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 23 Jan 2024 16:03:21 +0100 Subject: [PATCH] Code optimization --- web/js/Database.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/web/js/Database.js b/web/js/Database.js index 02a3985..612388c 100644 --- a/web/js/Database.js +++ b/web/js/Database.js @@ -1,13 +1,6 @@ function sendData(naam, score) { - const request = ( url, params = {}) => { - url += '?' + ( new URLSearchParams( params ) ).toString(); - fetch( url ); -}; - const get = ( url, params ) => request( url, params); - - get('https://oege.ie.hva.nl/~hossan/postData.php', { name: naam, score: score } ); - + fetch (`https://oege.ie.hva.nl/~hossan/postData.php?name=${naam}&score=${score}`) } function getData(name){