14 lines
378 B
TypeScript
14 lines
378 B
TypeScript
import axios from "axios";
|
|
|
|
export async function salvarPaciente(formData: Record<string, any>) {
|
|
try {
|
|
const response = await axios.post("https://mock.apidog.com/m1/1053378-0-default/pacientes", formData,
|
|
{ headers: { "Content-Type": "application/json" } }
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
console.log('error', error);
|
|
throw error
|
|
}
|
|
}
|