Bumped dependencies & added error display for Posts
This commit is contained in:
@@ -15,6 +15,7 @@ export const usePostStore = defineStore('post', () => {
|
||||
|
||||
async function fetchPosts() {
|
||||
postList.value = []
|
||||
errors.value = []
|
||||
loading.value = true
|
||||
const result = await fetch('https://api.flycro.me/items/Post')
|
||||
if (!result.ok) errors.value.push({ message: 'Failed to fetch posts' })
|
||||
@@ -73,6 +74,7 @@ export const usePostStore = defineStore('post', () => {
|
||||
initialLoad,
|
||||
postList,
|
||||
currentPost,
|
||||
errors,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user