routes added

This commit is contained in:
Wenszel
2021-03-13 16:59:54 +01:00
parent 3b6fa7eab6
commit 99d347a514
8 changed files with 51 additions and 36 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ const NameInput = ()=>{
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name: inputValue })
};
fetch('localhost:3000/adduser', request)
fetch('localhost:3000/room/add', request)
.then(response => {
if(response.status == 200){
//redirect
@@ -21,7 +21,7 @@ const NameInput = ()=>{
}
return(
<div>
<input placeholder = "Podaj swoje imię" type="text" onChange={handleInputChange}/>
<input placeholder = "Enter name" type="text" onChange={handleInputChange}/>
<input type="submit" onClick={handleButtonClick}/>
</div>
)