Merge pull request #225 from glours/security-fixes-rust-sample

fix security issues on react-rust-postgres sample
master
Guillaume Lours 3 years ago committed by GitHub
commit 4b279770bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load Diff

@ -3,12 +3,12 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@testing-library/jest-dom": "^4.2.4", "@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^9.5.0", "@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1", "@testing-library/user-event": "^7.2.1",
"react": "^16.13.1", "react": "^16.13.1",
"react-dom": "^16.13.1", "react-dom": "^16.13.1",
"react-scripts": "3.4.1" "react-scripts": "^5.0.0"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",

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

Loading…
Cancel
Save