updated adapters to automatically verify auth

This commit is contained in:
dswbx
2025-01-25 09:09:09 +01:00
parent f64e5dac03
commit b0c5f6307a
11 changed files with 60 additions and 57 deletions

View File

@@ -2,8 +2,7 @@
import { getApi } from "bknd/adapter/astro";
import Card from "../components/Card.astro";
import Layout from "../layouts/Layout.astro";
const api = getApi(Astro, { mode: "dynamic" });
await api.verifyAuth();
const api = await getApi(Astro, { mode: "dynamic" });
const { data } = await api.data.readMany("todos");
const user = api.getUser();