Commit d09f52c
Fix login_required to return JSON for API routes
- Check request.path.startswith('/api/') in addition to is_json
- Fixes "Unexpected token <" error when API returns HTML redirect
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 5078d1a commit d09f52c
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
| 476 | + | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| |||
0 commit comments