15 lines
490 B
TypeScript
15 lines
490 B
TypeScript
import axios from "axios"
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const body = await readBody(event)
|
|
try {
|
|
const response = await axios.post("http://10.10.123.140:8082/api/suratkontrol/datalogmethod",body)
|
|
return response.data
|
|
// console.log("ini data response",response.data)
|
|
} catch (error) {
|
|
throw createError({
|
|
statusCode: 500,
|
|
statusMessage: "Failed to fetch data log api by method",
|
|
})
|
|
}
|
|
}) |