feat: Seo meta tag
This commit is contained in:
+2
-2
@@ -12,9 +12,9 @@ export const useArticleStore = defineStore("article", () => {
|
||||
|
||||
const getArticleBySlug = async (slug: string) => {
|
||||
try {
|
||||
const { data} = await useFetch(`/api/articles/get-by-slug/${slug}`)
|
||||
const { data: article } = await useAsyncData('article', () => $fetch(`/api/articles/get-by-slug/${slug}`))
|
||||
currentArticle.value = {}
|
||||
currentArticle.value = data.value.item
|
||||
currentArticle.value = article.value?.item
|
||||
} catch (error: any) {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user