fix: fetch for followed tags needs authorized session (#3277)

This commit is contained in:
ayo 2025-04-28 10:32:05 +02:00 committed by GitHub
parent ec594410e4
commit 81675930eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 5 deletions

View file

@ -1,4 +1,6 @@
<script setup lang="ts">
import type { mastodon } from 'masto'
definePageMeta({
name: 'tag',
})
@ -23,7 +25,11 @@ onReactivated(() => {
// The user will see the previous content first, and any changes will be updated to the UI when the request is completed
refresh()
})
const followedTags = (await useMasto().client.value.v1.followedTags.list({ limit: 0 }))
let followedTags: mastodon.v1.Tag[] | undefined
if (currentUser.value !== undefined) {
followedTags = (await useMasto().client.value.v1.followedTags.list({ limit: 0 }))
}
</script>
<template>