Skip to content

Commit e721cb8

Browse files
committed
update session miniDoc types
1 parent 626c25d commit e721cb8

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

app/components/AuthButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const { user } = await useAtproto()
1111
:aria-label="ariaLabel"
1212
@click="showModal = true"
1313
>
14-
{{ user?.miniDoc?.handle || 'login' }}
14+
{{ user?.handle || 'login' }}
1515
</button>
1616

1717
<AuthModal v-model:open="showModal" />

app/components/AuthModal.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ async function handleLogin() {
7575
</button>
7676
</div>
7777

78-
<div v-if="user?.miniDoc?.handle" class="space-y-4">
78+
<div v-if="user?.handle" class="space-y-4">
7979
<div class="flex items-center gap-3 p-4 bg-bg-subtle border border-border rounded-lg">
8080
<span class="w-3 h-3 rounded-full bg-green-500" aria-hidden="true" />
8181
<div>
82-
<p class="font-mono text-xs text-fg-muted">
83-
Logged in as @{{ user.miniDoc.handle }}
84-
</p>
82+
<p class="font-mono text-xs text-fg-muted">Logged in as @{{ user.handle }}</p>
8583
</div>
8684
</div>
8785
<button

server/api/auth/atproto.get.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ export default defineEventHandler(async event => {
5656
)
5757
const miniDoc = (await response.json()) as { did: string; handle: string; pds: string }
5858

59-
await session.update({
60-
miniDoc,
61-
})
59+
await session.update(miniDoc)
6260

6361
return sendRedirect(event, '/')
6462
})

0 commit comments

Comments
 (0)