mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Update frontend/src/apis/loginAPI.js
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
This commit is contained in:
parent
cb0b3ef90e
commit
c836bde158
@ -29,9 +29,9 @@ const apiPost = async (url, payload) => {
|
|||||||
if(result.status !== 200){
|
if(result.status !== 200){
|
||||||
throw new Error('HTTP Status Error '+result.status)
|
throw new Error('HTTP Status Error '+result.status)
|
||||||
}
|
}
|
||||||
if(result.data.state === 'warning') {
|
if(result.data.state === 'warning') {
|
||||||
return { success: true, result: error }
|
return { success: true, result: error }
|
||||||
}
|
}
|
||||||
if(result.data.state !== 'success'){
|
if(result.data.state !== 'success'){
|
||||||
throw new Error(result.data.msg)
|
throw new Error(result.data.msg)
|
||||||
}
|
}
|
||||||
@ -66,4 +66,4 @@ const loginAPI = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default loginAPI
|
export default loginAPI
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user