thainnv-dev: Nhúng

This commit is contained in:
nguyen van thai
2024-06-06 13:29:22 +07:00
parent 0a7774b7f4
commit c217ed82c9
25 changed files with 382 additions and 45 deletions
+22
View File
@@ -0,0 +1,22 @@
import { H3Event } from 'h3';
import Base from './base'
export const fetchByPollId = async (event: H3Event) => {
try {
const { apiUrl } = useRuntimeConfig().public
const { pollId}: any = getQuery(event)
const { items }: any = await $fetch(`${apiUrl}/cms/poll-option/poll:${pollId}`, {
method: 'GET',
headers: {
site: 1
}
})
return items
} catch (error) {
handleError(error);
}
}