tried it with axios

This commit is contained in:
2024-01-26 18:25:46 +01:00
parent 2a4dc80efa
commit c5fbb12dfd
4 changed files with 68 additions and 49 deletions

View File

@ -0,0 +1,17 @@
let globalUserObject: { [key: string]: any } | null = null;
// let globalUserObject = null;
export default defineEventHandler((event) => {
if (event.path.startsWith("/api/login")) {
// get user object from backend
const userObject = {
username: "test",
password: "asd"
}
globalUserObject = userObject;
}
})
export { globalUserObject };