kunjungan pasien

This commit is contained in:
ahdan15
2024-12-18 10:05:57 +07:00
parent 9999faa387
commit a069659fec
6 changed files with 322 additions and 142 deletions

View File

@@ -0,0 +1,23 @@
import axios from "axios";
export default defineEventHandler(async (event) => {
const body = await readBody(event)
console.log(body)
try {
console.log("MASUK DALAM SINI")
const response = await axios.post("http://10.10.150.129:8082/api/kunjunganpasien/listkunjunganpasien", body);
console.log(response.data)
return response.data
} catch (error) {
console.error("Error posting to API:", error);
throw createError({
statusCode: 500,
statusMessage: "Failed to fetch data from API",
});
}
});