Fix API calls to use baseURL for proper routing

Co-authored-by: Mord0reK <135718526+Mord0reK@users.noreply.github.com>
pull/878/head
copilot-swe-agent[bot] 2025-11-16 19:26:13 +07:00
parent 00884aab5e
commit 8c99e335dc
1 changed files with 3 additions and 3 deletions

@ -23,7 +23,7 @@ export default function(widget) {
}
// Call API to complete task
fetch(`/api/vikunja/${widgetID}/complete-task`, {
fetch(`${pageData.baseURL}/api/vikunja/${widgetID}/complete-task`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@ -96,7 +96,7 @@ function openEditModal(widgetID, taskID, title, dueDate, currentLabelIDs, row) {
// Fetch and display labels
labelsContainer.innerHTML = '<p>Ładowanie etykiet...</p>';
fetch(`/api/vikunja/${widgetID}/labels`)
fetch(`${pageData.baseURL}/api/vikunja/${widgetID}/labels`)
.then(response => response.json())
.then(labels => {
labelsContainer.innerHTML = '';
@ -164,7 +164,7 @@ function openEditModal(widgetID, taskID, title, dueDate, currentLabelIDs, row) {
}
// Call API to update task
fetch(`/api/vikunja/${widgetID}/update-task`, {
fetch(`${pageData.baseURL}/api/vikunja/${widgetID}/update-task`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',