mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-13 06:05:34 +08:00
Merge branch 'main' into main
This commit is contained in:
commit
094c106b7c
@ -61,7 +61,7 @@
|
|||||||
"tailwindcss": "^3.3.3",
|
"tailwindcss": "^3.3.3",
|
||||||
"tailwindcss-safe-area": "^0.4.0",
|
"tailwindcss-safe-area": "^0.4.0",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.1",
|
||||||
"vite": "^4.4.9",
|
"vite": "^4.4.9",
|
||||||
"vite-plugin-pwa": "^0.16.5",
|
"vite-plugin-pwa": "^0.16.5",
|
||||||
"vite-plugin-solid": "^2.7.0",
|
"vite-plugin-solid": "^2.7.0",
|
||||||
|
@ -156,8 +156,8 @@ dependencies:
|
|||||||
specifier: ^5.2.2
|
specifier: ^5.2.2
|
||||||
version: 5.2.2
|
version: 5.2.2
|
||||||
uuid:
|
uuid:
|
||||||
specifier: ^9.0.0
|
specifier: ^9.0.1
|
||||||
version: 9.0.0
|
version: 9.0.1
|
||||||
vite:
|
vite:
|
||||||
specifier: ^4.4.9
|
specifier: ^4.4.9
|
||||||
version: 4.4.9(@types/node@20.6.0)
|
version: 4.4.9(@types/node@20.6.0)
|
||||||
@ -5894,8 +5894,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/uuid@9.0.0:
|
/uuid@9.0.1:
|
||||||
resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==}
|
resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
@ -26,9 +26,19 @@ export const [endpointList, setEndpointList] = makePersisted(
|
|||||||
export const useRequest = () => {
|
export const useRequest = () => {
|
||||||
const e = endpoint()
|
const e = endpoint()
|
||||||
|
|
||||||
|
if (!e) {
|
||||||
|
return ky.create({})
|
||||||
|
}
|
||||||
|
|
||||||
|
const headers = new Headers()
|
||||||
|
|
||||||
|
if (e.secret) {
|
||||||
|
headers.set('Authorization', `Bearer ${e.secret}`)
|
||||||
|
}
|
||||||
|
|
||||||
return ky.create({
|
return ky.create({
|
||||||
prefixUrl: e?.url,
|
prefixUrl: e.url,
|
||||||
headers: { Authorization: e?.secret ? `Bearer ${e.secret}` : '' },
|
headers,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user