Change Post Sort
This commit is contained in:
@@ -17,7 +17,7 @@ export const usePostStore = defineStore('post', () => {
|
||||
postList.value = []
|
||||
errors.value = []
|
||||
loading.value = true
|
||||
const result = await fetch('https://api.flycro.me/items/Post')
|
||||
const result = await fetch('https://api.flycro.me/items/Post?sort=-date_created')
|
||||
if (!result.ok) errors.value.push({ message: 'Failed to fetch posts' })
|
||||
const data = await result.json()
|
||||
data.data.forEach((item) => {
|
||||
|
||||
Reference in New Issue
Block a user