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:
@@ -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',
|
||||
|
||||
@@ -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 })
|
||||
|
||||
@@ -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 })
|
||||
|
||||
@@ -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 })
|
||||
|
||||
2
app/templates/vendor/partials/header.html
vendored
2
app/templates/vendor/partials/header.html
vendored
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user