Update frontend/src/apis/loginAPI.js

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
This commit is contained in:
einhornimmond 2021-03-29 19:17:41 +02:00 committed by GitHub
parent cb0b3ef90e
commit c836bde158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
export default loginAPI