diff --git a/web/src/Command/Command.jsx b/web/src/Command/Command.jsx index d7c86b8..82417d1 100644 --- a/web/src/Command/Command.jsx +++ b/web/src/Command/Command.jsx @@ -12,7 +12,8 @@ class Command extends React.Component { componentDidMount() { - fetch(`http://localhost:3000/v1/commands/test`) + const commandName = window.location.pathname + fetch(`http://localhost:3000/v1${commandName}`) .then(res => res.json()) .then( (result) => {