From 87f8e8d45791ea9c70fcad69c2ea86dbc4d59569 Mon Sep 17 00:00:00 2001 From: AntoninoP Date: Wed, 10 Jul 2024 13:33:33 +0200 Subject: [PATCH] fix appel api modfis valeur --- src/pages/ServerDetails/ServerDetails.jsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pages/ServerDetails/ServerDetails.jsx b/src/pages/ServerDetails/ServerDetails.jsx index ece7bc7..ab5a73d 100644 --- a/src/pages/ServerDetails/ServerDetails.jsx +++ b/src/pages/ServerDetails/ServerDetails.jsx @@ -46,13 +46,15 @@ const ServerDetails = ({ user }) => { ['max-players', server.maxPlayers.toString()], ['motd', server.motd], ['difficulty', server.difficulty], - ['enableCommandBlock', server.enableCommandBlock.toString()], - ['gamemode', server.gamemode], + ['enable-command-block', server.enableCommandBlock.toString()], + ['gamemode', server.gamemode.toString()], ['hardcore', server.hardcore.toString()], - ['onlineMode', server.onlineMode.toString()], + ['online-mode', server.onlineMode.toString()], ['pvp', server.pvp.toString()] ]; - + + + await serviiApi.updateProperties(server.name, props); } catch (error) { console.error('Error updating server:', error); @@ -62,7 +64,7 @@ const ServerDetails = ({ user }) => { const handleQuit = () => { navigate('/dashboard'); - } + }; if (loading) { return ; @@ -143,7 +145,6 @@ const ServerDetails = ({ user }) => { ); - }; export default ServerDetails;