mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
get commandname from url
This commit is contained in:
parent
69819e4241
commit
8ce13d01c3
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue