@dargmuesli/nuxt-vio 9.0.0-beta.4 → 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
|
-
|
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.
|
3
|
+
"version": "9.0.0-beta.6",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/dargmuesli/vio.git"
|
@@ -48,6 +48,7 @@
|
|
48
48
|
"@tailwindcss/forms": "0.5.6",
|
49
49
|
"@tailwindcss/typography": "0.5.10",
|
50
50
|
"@types/lodash-es": "4.17.10",
|
51
|
+
"@urql/core": "4.1.4",
|
51
52
|
"@vuelidate/core": "2.0.3",
|
52
53
|
"@vuelidate/validators": "2.0.4",
|
53
54
|
"clipboardy": "4.0.0",
|
@@ -63,7 +64,6 @@
|
|
63
64
|
"@nuxtjs/eslint-config-typescript": "12.1.0",
|
64
65
|
"@playwright/test": "1.39.0",
|
65
66
|
"@unhead/vue": "1.8.3",
|
66
|
-
"@urql/core": "4.1.4",
|
67
67
|
"@urql/devtools": "2.0.3",
|
68
68
|
"@urql/exchange-graphcache": "6.3.3",
|
69
69
|
"@urql/vue": "1.1.2",
|
@@ -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",
|
package/utils/networking.ts
CHANGED
@@ -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
|
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
|
|