Merge pull request #2 from Antoninop/dev

fix appel api modfis valeurs
This commit is contained in:
Antoninop 2024-07-10 13:35:30 +02:00 committed by GitHub
commit 7cba360e42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 <Loading />;
@ -143,7 +145,6 @@ const ServerDetails = ({ user }) => {
</div>
</div>
);
};
export default ServerDetails;