penambahan tabel pencarian, form tambah, form ubah
This commit is contained in:
@@ -3,15 +3,14 @@ import axios from "axios";
|
||||
export default defineEventHandler(async (event) => {
|
||||
// Read the body of the incoming request
|
||||
const body = await readBody(event);
|
||||
console.log(body)
|
||||
console.log("masuk")
|
||||
|
||||
try {
|
||||
const response = await axios.post("http://localhost:8082/api/suratkontrol/cari", body, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
console.log(response.data)
|
||||
return response.data
|
||||
// const response = await axios.post("http://10.10.150.129:8082/api/suratkontrol/cari", body, {
|
||||
const response = await axios.post("http://10.10.150.129:8082/api/suratkontrol/insert/", body);
|
||||
console.log(response)
|
||||
// return response.data
|
||||
} catch (error) {
|
||||
console.error("Error posting to surat kontrol API:", error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user