fix: [rd] API 호출 URL /admin → /api/admin 수정
- index, create, show 뷰의 fetch URL을 /api/admin/rd/... 로 수정 - api.php 라우트는 api/ prefix가 자동 적용됨
This commit is contained in:
@@ -134,7 +134,7 @@ function updateProviderUI() {
|
||||
const token = document.querySelector('meta[name="api-token"]')?.content
|
||||
|| sessionStorage.getItem('api_token') || '';
|
||||
|
||||
const response = await fetch('{{ url("/admin/rd/ai-quotation") }}', {
|
||||
const response = await fetch('{{ url("/api/admin/rd/ai-quotation") }}', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@@ -61,7 +61,7 @@ function loadQuotations(page = 1) {
|
||||
const params = new URLSearchParams(formData);
|
||||
params.set('page', page);
|
||||
|
||||
const url = `{{ url('/admin/rd/ai-quotation') }}?${params.toString()}`;
|
||||
const url = `{{ url('/api/admin/rd/ai-quotation') }}?${params.toString()}`;
|
||||
|
||||
fetch(url, {
|
||||
headers: {
|
||||
|
||||
@@ -267,7 +267,7 @@ class="bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded-lg transit
|
||||
const token = document.querySelector('meta[name="api-token"]')?.content
|
||||
|| sessionStorage.getItem('api_token') || '';
|
||||
|
||||
const response = await fetch('{{ url("/admin/rd/ai-quotation/{$quotation->id}/analyze") }}', {
|
||||
const response = await fetch('{{ url("/api/admin/rd/ai-quotation/{$quotation->id}/analyze") }}', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user