first commit

This commit is contained in:
2024-12-27 16:46:43 +07:00
commit 1962bfb8cc
24 changed files with 7415 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import axios from "axios";
export default defineEventHandler(async (event) => {
const body = await readBody(event);
// const email = body.email
// const password = body.password
console.log(body.email)
console.log(body.password)
try {
const response = await axios.post("http://10.10.150.129:8082/api/login/" + body);
return response.data
} catch (error) {
console.error("Error posting to surat kontrol API:", error);
throw createError({
statusCode: 500,
statusMessage: "Failed to fetch data from surat kontrol API",
});
}
});