added public route for demonstration

This commit is contained in:
2025-06-18 14:28:39 +02:00
parent f036a8af15
commit 2ad00a1a50
2 changed files with 8 additions and 0 deletions

View File

@@ -17,6 +17,10 @@ app.use(express.json())
app.use(cors())
app.use(clerkMiddleware())
app.get('/public', (_, res) => {
res.send('public route accessed');
});
app.get('/identify-yourself', requireAuth(), (req, res) => {
const auth = getAuth(req)

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { useGet } from "~/composables/useGet";
const publicResult = await useGet('/public')
const identifiedResult = await useGet('/identify-yourself')
const allowedResult = await useGet('/do-you-have-permission')
const thingsResult = await useGet('/things')
@@ -18,6 +19,9 @@ console.log('something')
</SignedOut>
</header>
<main>
<div>
public: {{ publicResult.data }}
</div>
<div>
identified: {{ identifiedResult.data }}
</div>