mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-26 19:24:12 +08:00
fix: support sing-box (#36)
This commit is contained in:
parent
12e8c9a50b
commit
4eeb3458cc
@ -19,17 +19,15 @@ export default () => {
|
||||
const { form } = createForm<z.infer<typeof schema>>({
|
||||
extend: validator({ schema }),
|
||||
async onSubmit(values) {
|
||||
const { hello } = await ky
|
||||
.get(values.url, {
|
||||
headers: values.secret
|
||||
? {
|
||||
Authorization: `Bearer ${values.secret}`,
|
||||
}
|
||||
: {},
|
||||
})
|
||||
.json<{ hello: string }>()
|
||||
const { ok } = await ky.get(values.url, {
|
||||
headers: values.secret
|
||||
? {
|
||||
Authorization: `Bearer ${values.secret}`,
|
||||
}
|
||||
: {},
|
||||
})
|
||||
|
||||
if (!hello) {
|
||||
if (!ok) {
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user