minhnt-dev: SEO

This commit is contained in:
MoreStrive
2024-06-21 17:51:36 +07:00
parent a447a8a7aa
commit e151dda2ad
7 changed files with 23 additions and 11 deletions
+2 -2
View File
@@ -15,9 +15,9 @@ export const useArticleStore = defineStore("article", () => {
const getArticleBySlug = async (slug: string) => {
try {
const { data: article } = await useAsyncData('article', () => $fetch(`/api/articles/get-by-slug/${slug}`))
const article = await $fetch(`/api/articles/get-by-slug/${slug}`)
currentArticle.value = {}
currentArticle.value = article.value?.item
currentArticle.value = article?.item
} catch (error: any) { }
}