fix(pages): add auth middleware to /my-stuff/stories
This commit is contained in:
parent
84c994448a
commit
96aa993f69
@ -1,11 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import SingleStory from "~/components/listings/singleStory.vue";
|
||||
import { IStory } from "@models/stories";
|
||||
const { data: stories } = await useApiFetch<{ stories: IStory[]; total: number }>("/user/me/stories");
|
||||
definePageMeta({
|
||||
middleware: ["auth"],
|
||||
});
|
||||
const { data: stories, error } = await useApiFetch<{ stories: IStory[]; total: number }>("/user/me/stories");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-list :grid="{ gutter: 6, lg: 2, sm: 1 }" :data-source="stories.stories">
|
||||
<a-list :grid="{ gutter: [16, 16], md: 2, lg: 3, xxl: 3, sm: 1 }" :data-source="stories.stories">
|
||||
<template #renderItem="{ item }">
|
||||
<single-story :story="item" show-actions />
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user