Firs Commit
This commit is contained in:
17
server/api/user/get/index.get.ts
Normal file
17
server/api/user/get/index.get.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import axios from "axios";
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
console.log("ste");
|
||||
try{
|
||||
const response = await axios.get("http://10.10.150.129:8801/api/local/getalluser");
|
||||
return response.data
|
||||
}catch(error){
|
||||
console.error("Error posting to user data API :", error);
|
||||
|
||||
throw createError({
|
||||
statusCode:500,
|
||||
statusMessage : "Failed to fetch data from surat kontrol API",
|
||||
})
|
||||
}
|
||||
//return 'Hello Nitro'
|
||||
})
|
||||
Reference in New Issue
Block a user