Fix profile create 307 redirect by adding trailing slash

POST /api/profiles was being redirected to /api/profiles/ (307),
which drops the request body. Match the FastAPI route definition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 08:22:22 -06:00
parent 3e66f31df9
commit 65e1a3c88b

View File

@@ -705,7 +705,7 @@
if (!name) { showToast('Profile name required', 'error'); return; } if (!name) { showToast('Profile name required', 'error'); return; }
const body = { name }; const body = { name };
if (display) body.display_name = display; if (display) body.display_name = display;
const res = await apiCall('POST', '/api/profiles', body); const res = await apiCall('POST', '/api/profiles/', body);
if (res.ok) { if (res.ok) {
showToast('Profile "' + name + '" created', 'success'); showToast('Profile "' + name + '" created', 'success');
setTimeout(() => location.reload(), 1000); setTimeout(() => location.reload(), 1000);