add view count

This commit is contained in:
xuyue committed 2026-05-05 19:16:58 -06:00
1 parent 4af9ae90c9
commit 9a8e5ad48e
1 file changed
+2 -1
+2 -1
View File
@@ -156,7 +156,7 @@
import { computed, onMounted, ref } from "vue"
import { useRouter } from "vue-router"
import { Icon } from "@iconify/vue"
import { Showcase } from "../api"
import { Showcase, Submission } from "../api"
import type { PromptRound, ShowcaseDetail } from "../utils/type"
const props = defineProps<{
@@ -221,6 +221,7 @@ function onCollapseChange(
async function init() {
try {
detail.value = await Showcase.getDetail(props.id)
void Submission.incrementView(props.id)
} catch {
notFound.value = true
}