Correção cadastro de vans

This commit is contained in:
Matheus Albino Brunhara
2022-06-20 05:51:25 -05:00
parent b1120248b9
commit c631bb9112
2 changed files with 5 additions and 13 deletions

View File

@@ -340,22 +340,14 @@ const CadastroVan: React.FC = () => {
</IonList>
<IonToast
color='danger'
position="top"
color={toastColor}
isOpen={showToast}
onDidDismiss={() => setShowToast(false)}
message={toastMessage}
duration={2500}
/>
</IonContent>
<IonToast
position="top"
color={toastColor}
isOpen={showToast}
onDidDismiss={() => setShowToast(false)}
message={toastMessage}
duration={2500}
/>
</IonContent>
</IonPage>
);
};

View File

@@ -42,7 +42,7 @@ interface CreateVanBody {
export async function create(CreateVanBody: CreateVanBody) {
updateHeader();
const response = await instance.post(vansRoutes.create.url, CreateVanBody);
const response = await instance.post(vansRoutes.create.url, CreateVanBody, { headers: header });
return response.data;
}
@@ -60,4 +60,4 @@ export async function update(vanData: UpdateVanBody) {
});
return response.data;
}
}