Skip to content

Commit

Permalink
feat: optional path for useRoadizWebResponse()
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelodelain committed Mar 25, 2024
1 parent 6c2e92e commit eb51f85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composables/use-roadiz-web-response.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import type { RoadizWebResponse } from '@roadiz/types'
import { joinURL } from 'ufo'

export async function useRoadizWebResponse<T>(path?: string) {
path = joinURL('/', path || useRoute().path)

export async function useRoadizWebResponse<T>(path: string) {
const fetch = useRoadizFetchFactory()
const { data } = await useAsyncData(async () => {
try {
Expand Down

0 comments on commit eb51f85

Please sign in to comment.