补足分支条件

This commit is contained in:
2026-08-01 10:42:40 +08:00
parent 3e99f2f66f
commit 63f320fa6d
2 changed files with 4 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ export async function GET(req: NextRequest) {
const separator = rSeparator.split(',').map(code => String.fromCharCode(parseInt(code))).join('')
switch (format) {
case '2':
case 'json':
if (hostFormat === 'domain') {
const domainFormatData = result.data.map(item => ({
@@ -64,7 +65,9 @@ export async function GET(req: NextRequest) {
}))
return NextResponse.json(ipFormatData)
}
case '1':
case 'text':
default:
const text = result.data.map((item) => {
let hostValue: string
if (hostFormat === 'domain') {