From c836bde15896109456e0b6beee48c20fb9561929 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Mon, 29 Mar 2021 19:17:41 +0200 Subject: [PATCH] Update frontend/src/apis/loginAPI.js Co-authored-by: Ulf Gebhardt --- frontend/src/apis/loginAPI.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/apis/loginAPI.js b/frontend/src/apis/loginAPI.js index b9e433730..3b8c853a5 100644 --- a/frontend/src/apis/loginAPI.js +++ b/frontend/src/apis/loginAPI.js @@ -29,9 +29,9 @@ const apiPost = async (url, payload) => { if(result.status !== 200){ throw new Error('HTTP Status Error '+result.status) } - if(result.data.state === 'warning') { - return { success: true, result: error } - } + if(result.data.state === 'warning') { + return { success: true, result: error } + } if(result.data.state !== 'success'){ throw new Error(result.data.msg) } @@ -66,4 +66,4 @@ const loginAPI = { }, } -export default loginAPI \ No newline at end of file +export default loginAPI