This commit is contained in:
Sewmina (server) 2024-09-04 12:55:11 +08:00
parent 13472a8d21
commit 9b66a61eea

View File

@ -157,10 +157,10 @@ app.get("/getTournamentParticipentsCount", async(request,response)=>{
if(!id){response.status(400).json({error:"id is required"})} if(!id){response.status(400).json({error:"id is required"})}
try{ try{
const tx = await contract.getTournamentParticipentsCount(address); const tx = await contract.getTournamentParticipentsCount(id);
response.json({ count: tx.toString() }); response.json({ count: tx.toString() });
}catch(err){ }catch(err){
console.error("Error reading participents for tourney:", err); console.error("Error reading participents for tourney:", err);
response.status(500).json({ error: err.message }); response.status(500).json({ error: err.message });
} }
}) })