Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 6304 | Rev 11152 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 6304 Rev 6305
Línea 11... Línea 11...
11
    const onSubmit = ({ footer }) => {
11
    const onSubmit = ({ footer }) => {
12
        const data = new FormData()
12
        const data = new FormData()
13
        data.append("footer", footer[0])
13
        data.append("footer", footer[0])
Línea 14... Línea 14...
14
 
14
 
-
 
15
        axios.post(footerUploadUrl, data)
-
 
16
            .then(({ data }) => {
-
 
17
                if (!data.success) {
-
 
18
                    return setError(data.data)
-
 
19
                }
-
 
20
                action(data.data)
15
        axios.post(footerUploadUrl, data)
21
            })
-
 
22
            .then(() => {
-
 
23
                setError(null)
-
 
24
                closeModal()
16
            .then(resp => resp.json())
25
            })
17
            .catch(err => console.log(err))
-
 
18
            .then(resp => console.log(resp))
26
            .catch(err => console.log(err))
Línea 19... Línea 27...
19
    }
27
    }
20
 
28
 
21
    return (
29
    return (