mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix linting errors
This commit is contained in:
parent
1e4ba146ac
commit
28c0bc0966
@ -9,17 +9,16 @@ const EMAIL_TYPE = {
|
|||||||
|
|
||||||
const apiGet = async (url) => {
|
const apiGet = async (url) => {
|
||||||
try {
|
try {
|
||||||
const result = await axios.get(url);
|
const result = await axios.get(url)
|
||||||
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 !== 'success') {
|
||||||
if(result.data.state !== 'success'){
|
|
||||||
throw new Error(result.data.msg)
|
throw new Error(result.data.msg)
|
||||||
}
|
}
|
||||||
return { success: true, result }
|
return { success: true, result }
|
||||||
} catch(error){
|
} catch (error) {
|
||||||
return { success: false, result: error}
|
return { success: false, result: error }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,11 +28,10 @@ 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)
|
||||||
}
|
}
|
||||||
return { success: true, result }
|
return { success: true, result }
|
||||||
|
|||||||
2
gn
2
gn
@ -1 +1 @@
|
|||||||
Subproject commit a61871987261614102b11ed58791081be1954d3c
|
Subproject commit 5437e2f882c54efe4f501f7cd0d97f53806d0b74
|
||||||
Loading…
x
Reference in New Issue
Block a user