Update HTML templates and JavaScript for FastAPI compatibility
- Replace Flask url_for() with direct /static/ paths in all HTML templates - Update CSS and JavaScript file references to use FastAPI static mount - Convert Flask-specific template patterns to FastAPI-compatible syntax - Update JavaScript API endpoints to match new FastAPI route structure: * /api/series -> /api/v1/anime * /api/search -> /api/v1/anime/search * /api/rescan -> /api/v1/anime/rescan - Add web interface routes for serving HTML templates - Add template response endpoints for /app, /login, /setup, /queue - Mark HTML template and JavaScript migration tasks as completed - Maintain Jinja2 template compatibility with FastAPI
This commit is contained in:
@@ -492,7 +492,7 @@ class AniWorldApp {
|
||||
try {
|
||||
this.showLoading();
|
||||
|
||||
const response = await fetch('/api/series');
|
||||
const response = await fetch('/api/v1/anime');
|
||||
|
||||
if (response.status === 401) {
|
||||
window.location.href = '/login';
|
||||
@@ -720,7 +720,7 @@ class AniWorldApp {
|
||||
try {
|
||||
this.showLoading();
|
||||
|
||||
const response = await this.makeAuthenticatedRequest('/api/search', {
|
||||
const response = await this.makeAuthenticatedRequest('/api/v1/anime/search', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -831,7 +831,7 @@ class AniWorldApp {
|
||||
|
||||
async rescanSeries() {
|
||||
try {
|
||||
const response = await this.makeAuthenticatedRequest('/api/rescan', {
|
||||
const response = await this.makeAuthenticatedRequest('/api/v1/anime/rescan', {
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user