Files
logapi_nuxt/.output/server/chunks/routes/api/subspesialis/index.get.mjs
T
2025-06-16 09:14:36 +07:00

25 lines
698 B
JavaScript

import { c as defineEventHandler, e as createError } from '../../../_/nitro.mjs';
import axios from 'axios';
import 'node:http';
import 'node:https';
import 'node:fs';
import 'node:url';
import '@iconify/utils';
import 'consola/core';
const index_get = defineEventHandler(async (event) => {
try {
const response = await axios.get("http://10.10.123.140:8082/api/subspesialis");
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"
});
}
});
export { index_get as default };
//# sourceMappingURL=index.get.mjs.map