From ccb31a172d6877c42815a524b02153320d789f86 Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 20 Apr 2024 13:57:37 +0200 Subject: [PATCH] fix build error --- front/src/pages/account/login.astro | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/front/src/pages/account/login.astro b/front/src/pages/account/login.astro index 3717ce2..80be112 100644 --- a/front/src/pages/account/login.astro +++ b/front/src/pages/account/login.astro @@ -2,7 +2,7 @@ import Layout from "../../layouts/Layout.astro"; import PocketBase from 'pocketbase'; import AstroUtils from "../../libs/AstroUtils"; -import Schema from 'models/Schema' +// import Schema from 'models/Schema' // const usr = await getUser(Astro.cookies) @@ -17,8 +17,8 @@ const res = await AstroUtils.wrap(async () => { } const form = await Astro.request.formData(); const request = { - email: form.get("username") as String, - password: form.get("password") as String + email: form.get("username") as string, + password: form.get("password") as string, } const pb = new PocketBase('http://127.0.0.1:3001'); @@ -30,7 +30,9 @@ const res = await AstroUtils.wrap(async () => { // after the above you can also access the auth data from the authStore console.log(pb.authStore.isValid); console.log(pb.authStore.token); - console.log(pb.authStore.model.id); + if(pb.authStore.model){ + console.log(pb.authStore.model.id); + } }) ---