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); } }