get commandname from url

This commit is contained in:
lyx0 2022-08-18 22:24:19 +02:00
parent 69819e4241
commit 8ce13d01c3

View file

@ -12,7 +12,8 @@ class Command extends React.Component {
componentDidMount() { componentDidMount() {
fetch(`http://localhost:3000/v1/commands/test`) const commandName = window.location.pathname
fetch(`http://localhost:3000/v1${commandName}`)
.then(res => res.json()) .then(res => res.json())
.then( .then(
(result) => { (result) => {