Skip to content

Commit 2462f94

Browse files
committed
refactor: Move reality scan service to API module and update null checks
1 parent e7d28d9 commit 2462f94

2 files changed

Lines changed: 2 additions & 37 deletions

File tree

dashboard/src/features/core-editor/components/xray/reality-scan-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Input } from '@/components/ui/input'
88
import { Label } from '@/components/ui/label'
99
import { Separator } from '@/components/ui/separator'
1010
import { CoreEditorFormDialog } from '@/features/core-editor/components/shared/core-editor-form-dialog'
11-
import { RealityScanResult, scanRealityTarget } from '@/service/reality-scan'
11+
import { RealityScanResult, scanRealityTarget } from '@/service/api'
1212
import dayjs from '@/lib/dayjs'
1313
import { dateUtils } from '@/utils/dateFormatter'
1414
import { cn } from '@/lib/utils'
@@ -216,7 +216,7 @@ function ScanResultDetail({ result }: { result: RealityScanResult }) {
216216
) : null}
217217
</div>
218218

219-
{result.server_names.length ? (
219+
{result.server_names?.length ? (
220220
<div className="space-y-2">
221221
<div className="text-muted-foreground text-xs font-medium">{t('coreEditor.realityScan.serverNames', { defaultValue: 'Certificate server names (valid SNIs)' })}</div>
222222
<div className="flex flex-wrap gap-1.5">

dashboard/src/service/reality-scan.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)