We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e986d8a commit df65d97Copy full SHA for df65d97
CWE-834/main.js
@@ -1,11 +1,13 @@
1
const main = async () => {
2
- const response = await fetch('/api', (req, res) => {
3
- const result = req.body
4
-
5
- for (let i = 0; i < result.length; i++) {
6
- console.log('Potential Denial of Service attack.')
7
- }
+ const response = await fetch('/api', {
+ method: 'GET',
8
})
9
10
- return response.json()
+ const result = await response.json()
+
+ for (let i = 0; i < result.length; i++) {
+ console.log('Potential Denial of Service attack.')
+ }
11
12
+ return result
13
}
0 commit comments