refacto(react-rust-postgres): replace rocket by actix-web (#153)
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
This commit is contained in:
6
react-rust-postgres/frontend/src/App.js
vendored
6
react-rust-postgres/frontend/src/App.js
vendored
@@ -5,9 +5,9 @@ import "./App.css";
|
||||
function App() {
|
||||
const [message, setMessage] = useState();
|
||||
useEffect(() => {
|
||||
fetch("/api/")
|
||||
.then(res => res.json())
|
||||
.then(res => setMessage(res.message))
|
||||
fetch("/api/users")
|
||||
.then((res) => res.json())
|
||||
.then((res) => setMessage(res.message))
|
||||
.catch(console.error);
|
||||
}, [setMessage]);
|
||||
return (
|
||||
|
Reference in New Issue
Block a user