fix security issues on react-rust-postgres sample

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
Signed-off-by: ajeetraina <ajeetraina@gmail.com>
This commit is contained in:
Guillaume Lours
2022-03-12 19:45:38 +01:00
committed by ajeetraina
parent 638af32cd5
commit 019c555e4f
3 changed files with 8225 additions and 10417 deletions

View File

@@ -7,7 +7,7 @@ function App() {
useEffect(() => {
fetch("/api/users")
.then((res) => res.json())
.then((res) => setMessage(res.message))
.then((res) => setMessage(`Hello with ${res.length} users`))
.catch(console.error);
}, [setMessage]);
return (