Browse Source

fix security issues on react-rust-postgres sample

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
Guillaume Lours 3 năm trước cách đây
mục cha
commit
6f66b4a526

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 776 - 560
react-rust-postgres/frontend/package-lock.json


+ 2 - 2
react-rust-postgres/frontend/package.json

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

+ 1 - 1
react-rust-postgres/frontend/src/App.js

@@ -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 (

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác