From 04072d2c45d36f25decbfdf477bb24ac22059a24 Mon Sep 17 00:00:00 2001
From: Haoyu Sun <SunH26@cardiff.ac.uk>
Date: Tue, 3 Dec 2024 17:56:36 +0000
Subject: [PATCH] post the id to change score

---
 src/main/resources/static/js/matchDetail.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main/resources/static/js/matchDetail.js b/src/main/resources/static/js/matchDetail.js
index 85ae5c2..0cb7b2f 100644
--- a/src/main/resources/static/js/matchDetail.js
+++ b/src/main/resources/static/js/matchDetail.js
@@ -8,6 +8,11 @@
 
     const matchInfo = document.getElementById('matchInfo');
     const matchScore = document.getElementById('matchScore');
+    // btn give the id
+    const updateBtn = document.getElementById("updateBtn");
+        updateBtn.addEventListener('click', function (){
+            window.location.href = `/html/matchDetailChangeScore.html?id=${id}`;
+        })
     matchScore.innerHTML = `<p><strong></strong>${matchData.scoreA} - ${matchData.scoreB}</p>
 `
     matchInfo.innerHTML = `
-- 
GitLab