Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 353 Rev 354
Línea 12... Línea 12...
12
    /**
12
    /**
13
     * Send form data
13
     * Send form data
14
     */
14
     */
15
    const handleSubmit = async () => {
15
    const handleSubmit = async () => {
16
        if (validateForm()) {
16
        if (validateForm()) {
17
            const formData = new FormData.append('content', JSON.stringify(test))
-
 
18
            await axios.post(action, 
17
            await axios.post(action,
19
                new FormData.append('content', JSON.stringify(test))
18
                new FormData().append('content', JSON.stringify(test))
20
                ).then((response) => {
19
            ).then((response) => {
21
                if (response.data.success) {
20
                if (response.data.success) {
22
                    console.info('Formulario almacenado');
21
                    console.info('Formulario almacenado');
23
                    setTest(null);
22
                    setTest(null);
24
                }
23
                }
25
            });
24
            });