feat: CI-CD front #2

Merged
Clement merged 20 commits from feat/CI-CD into master 2024-04-21 13:24:16 +00:00
Showing only changes of commit ccb31a172d - Show all commits

View File

@ -2,7 +2,7 @@
import Layout from "../../layouts/Layout.astro"; import Layout from "../../layouts/Layout.astro";
import PocketBase from 'pocketbase'; import PocketBase from 'pocketbase';
import AstroUtils from "../../libs/AstroUtils"; import AstroUtils from "../../libs/AstroUtils";
import Schema from 'models/Schema' // import Schema from 'models/Schema'
// const usr = await getUser(Astro.cookies) // const usr = await getUser(Astro.cookies)
@ -17,8 +17,8 @@ const res = await AstroUtils.wrap(async () => {
} }
const form = await Astro.request.formData(); const form = await Astro.request.formData();
const request = { const request = {
email: form.get("username") as String, email: form.get("username") as string,
password: form.get("password") as String password: form.get("password") as string,
} }
const pb = new PocketBase('http://127.0.0.1:3001'); 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 // after the above you can also access the auth data from the authStore
console.log(pb.authStore.isValid); console.log(pb.authStore.isValid);
console.log(pb.authStore.token); console.log(pb.authStore.token);
console.log(pb.authStore.model.id); if(pb.authStore.model){
console.log(pb.authStore.model.id);
}
}) })
--- ---