fix: correct language API endpoint path to /api/v1/platform/language/set

The language set endpoint was being called at /api/v1/language/set but
the route is actually registered under the platform prefix at
/api/v1/platform/language/set.

Updated all frontend code calling this endpoint:
- app/templates/platform/base.html
- app/templates/vendor/partials/header.html
- app/modules/core/static/storefront/js/storefront-layout.js
- app/modules/core/static/vendor/js/init-alpine.js
- app/modules/core/static/admin/js/init-alpine.js

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-02 19:46:17 +01:00
parent aba44f4d45
commit a0b3f485eb
5 changed files with 5 additions and 5 deletions

View File

@@ -310,7 +310,7 @@ function languageSelector(currentLang, enabledLanguages) {
return;
}
try {
const response = await fetch('/api/v1/language/set', {
const response = await fetch('/api/v1/platform/language/set', {
method: 'POST',
headers: {
'Content-Type': 'application/json',

View File

@@ -273,7 +273,7 @@ function languageSelector(currentLang, enabledLanguages) {
return;
}
try {
const response = await fetch('/api/v1/language/set', {
const response = await fetch('/api/v1/platform/language/set', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ language: lang })

View File

@@ -201,7 +201,7 @@ function languageSelector(currentLang, enabledLanguages) {
return;
}
try {
const response = await fetch('/api/v1/language/set', {
const response = await fetch('/api/v1/platform/language/set', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ language: lang })

View File

@@ -332,7 +332,7 @@
return;
}
try {
const response = await fetch('/api/v1/language/set', {
const response = await fetch('/api/v1/platform/language/set', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ language: lang })

View File

@@ -49,7 +49,7 @@
return;
}
try {
const response = await fetch('/api/v1/language/set', {
const response = await fetch('/api/v1/platform/language/set', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ language: lang })