fix: applied based on code review

This commit is contained in:
Jin Yi
2026-01-29 17:00:17 +09:00
parent 07c8b822bc
commit 4b57a12ca5
5 changed files with 5 additions and 8 deletions

View File

@@ -0,0 +1,13 @@
import type { NodeReplacementResponse } from '../types'
import { api } from '@/scripts/api'
export async function fetchNodeReplacements(): Promise<NodeReplacementResponse> {
const response = await api.fetchApi('/node_replacements')
if (!response.ok) {
throw new Error(
`Failed to fetch node replacements: ${response.status} ${response.statusText}`
)
}
return response.json()
}