@dargmuesli/nuxt-vio 9.0.0-beta.5 → 9.0.0-beta.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,7 @@
1
- import { ofetch } from 'ofetch'
2
-
3
1
  export const useStrapiFetch = () => {
4
2
  const getServiceHref = useGetServiceHref()
5
3
 
6
- // TODO: switch back to $fetch (https://github.com/unjs/nitro/issues/470)
7
- return ofetch.create({
4
+ return $fetch.create({
8
5
  baseURL: getServiceHref({ name: 'creal_strapi', port: 1337 }) + '/api',
9
6
  })
10
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-vio",
3
- "version": "9.0.0-beta.5",
3
+ "version": "9.0.0-beta.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dargmuesli/vio.git"
@@ -82,7 +82,6 @@
82
82
  "lint-staged": "15.0.2",
83
83
  "lodash-es": "4.17.21",
84
84
  "nuxt": "3.8.1",
85
- "ofetch": "1.3.3",
86
85
  "pinia": "2.1.7",
87
86
  "prettier": "3.0.3",
88
87
  "prettier-plugin-tailwindcss": "0.5.6",
@@ -1,7 +1,6 @@
1
1
  import { CombinedError } from '@urql/core'
2
2
  import { H3Event, getCookie } from 'h3'
3
3
 
4
- import { ofetch } from 'ofetch'
5
4
  import { type Ref } from 'vue'
6
5
 
7
6
  import type { ApiData, BackendError } from '../types/api'
@@ -119,7 +118,7 @@ export const getTimezone = async (event: H3Event) => {
119
118
  }
120
119
 
121
120
  if (event.node.req.headers['x-real-ip']) {
122
- const ipApiResult = await ofetch<{ timezone: string }>(
121
+ const ipApiResult = await $fetch<{ timezone: string }>(
123
122
  `http://ip-api.com/json/${event.node.req.headers['x-real-ip']}`,
124
123
  ).catch(() => {})
125
124