Migrate all kitchen frontend fetch calls to /kitchen/api/ prefix (B5b)
All archive components were calling fetch('/api/...') directly. Replaced
all occurrences of /api/ URLs (string literals, template literals,
window.open, src attributes) with /kitchen/api/ across 37 source files.
The central axios instance in api.ts was already correct.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ecd63fc65f
commit
9905d0e0dd
51 changed files with 453 additions and 453 deletions
|
|
@ -87,7 +87,7 @@ export default function LineItemHistoryModal({
|
|||
if (dateFrom) params.set('date_from', dateFrom)
|
||||
if (dateTo) params.set('date_to', dateTo)
|
||||
|
||||
const res = await fetch(`/api/search/line-items/history?${params}`, {
|
||||
const res = await fetch(`/kitchen/api/search/line-items/history?${params}`, {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch history')
|
||||
|
|
@ -99,7 +99,7 @@ export default function LineItemHistoryModal({
|
|||
// Acknowledge price mutation
|
||||
const acknowledgeMutation = useMutation({
|
||||
mutationFn: async () => {
|
||||
const res = await fetch('/api/search/line-items/acknowledge-price', {
|
||||
const res = await fetch('/kitchen/api/search/line-items/acknowledge-price', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue