feat(config): phase 7 — drop /ims basePath, update all hardcoded paths, refresh env spec
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@ export function ClosurePanel({ incidentId, status, canClose, canAddAddenda }: Pr
|
||||
|
||||
useEffect(() => {
|
||||
if (!isClosed) return
|
||||
fetch(`/ims/api/incidents/${incidentId}/addenda`)
|
||||
fetch(`/api/incidents/${incidentId}/addenda`)
|
||||
.then(r => (r.ok ? r.json() : Promise.reject()))
|
||||
.then((data: Addendum[]) => setAddenda(Array.isArray(data) ? data : []))
|
||||
.catch(() => {})
|
||||
@@ -38,7 +38,7 @@ export function ClosurePanel({ incidentId, status, canClose, canAddAddenda }: Pr
|
||||
if (!confirm('Close this incident? The record will be locked — only addenda can be added afterwards.')) return
|
||||
setBusy(true)
|
||||
setError(null)
|
||||
const res = await fetch(`/ims/api/incidents/${incidentId}/close`, { method: 'POST' })
|
||||
const res = await fetch(`/api/incidents/${incidentId}/close`, { method: 'POST' })
|
||||
setBusy(false)
|
||||
if (!res.ok) {
|
||||
const data = await res.json().catch(() => ({}))
|
||||
@@ -53,7 +53,7 @@ export function ClosurePanel({ incidentId, status, canClose, canAddAddenda }: Pr
|
||||
if (!text) return
|
||||
setBusy(true)
|
||||
setError(null)
|
||||
const res = await fetch(`/ims/api/incidents/${incidentId}/addenda`, {
|
||||
const res = await fetch(`/api/incidents/${incidentId}/addenda`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ body: text }),
|
||||
@@ -65,7 +65,7 @@ export function ClosurePanel({ incidentId, status, canClose, canAddAddenda }: Pr
|
||||
return
|
||||
}
|
||||
setDraft('')
|
||||
const list = await fetch(`/ims/api/incidents/${incidentId}/addenda`).then(r => r.json()).catch(() => [])
|
||||
const list = await fetch(`/api/incidents/${incidentId}/addenda`).then(r => r.json()).catch(() => [])
|
||||
setAddenda(Array.isArray(list) ? list : [])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user