thainv-dev: Fix

This commit is contained in:
nguyen van thai
2024-07-17 10:35:35 +07:00
parent 5f9525371d
commit 795cd47e41
18 changed files with 78 additions and 43 deletions
+4 -1
View File
@@ -2,11 +2,14 @@ import type { PollOption } from "~/server/models/poll-option"
export const usePollOptionStore = defineStore('usePollOptionStore', () => {
const currentPollOption = shallowReactive<PollOption>({})
const currentPollOptions = shallowRef<PollOption[] | any[]>([])
const url : any = useRequestURL();
const host = url.hostname.split('.')[0];
async function fetchByPollId(id: string) {
try {
const { data } = await useFetch<any>(`/api/services/poll-option/pollId`, {
query: {
pollId: id
pollId: id,
site: host
}
})