refactor: remove URL prefixes from blueprints in the application

This commit is contained in:
Sam Chau
2025-02-05 13:06:15 +10:30
parent c0a26057f0
commit 8d3ab5718f
10 changed files with 10 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ from .manager import (save_arr_config, get_all_arr_configs, get_arr_config,
logger = logging.getLogger(__name__)
logger.setLevel(logging.ERROR)
bp = Blueprint('arr', __name__, url_prefix='/arr')
bp = Blueprint('arr', __name__)
@bp.route('/ping', methods=['POST', 'OPTIONS'])

View File

@@ -7,7 +7,7 @@ import logging
from ..db import get_db
logger = logging.getLogger(__name__)
bp = Blueprint('auth', __name__, url_prefix='/auth')
bp = Blueprint('auth', __name__)
@bp.route('/setup', methods=['GET', 'POST'])

View File

@@ -9,7 +9,7 @@ import tempfile
import zipfile
logger = logging.getLogger(__name__)
bp = Blueprint('backup', __name__, url_prefix='/backup')
bp = Blueprint('backup', __name__)
@bp.route('', methods=['GET'])

View File

@@ -9,7 +9,7 @@ from .utils import (get_category_directory, load_yaml_file, validate,
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
bp = Blueprint('data', __name__, url_prefix='/data')
bp = Blueprint('data', __name__)
@bp.route('/<string:category>', methods=['GET'])

View File

@@ -13,7 +13,7 @@ import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
bp = Blueprint('git', __name__, url_prefix='/git')
bp = Blueprint('git', __name__)
REPO_PATH = config.DB_DIR
branch_manager = Branch_Manager(REPO_PATH)

View File

@@ -11,7 +11,7 @@ from ..db import get_unique_arrs
logger = logging.getLogger('importarr')
bp = Blueprint('import', __name__, url_prefix='/import')
bp = Blueprint('import', __name__)
@bp.route('/format', methods=['POST', 'OPTIONS'])

View File

@@ -3,7 +3,7 @@ import os
from ..config import config
import logging
bp = Blueprint('logs', __name__, url_prefix='/logs')
bp = Blueprint('logs', __name__)
logger = logging.getLogger(__name__)

View File

@@ -7,7 +7,7 @@ from ..db import get_db
import logging
logger = logging.getLogger(__name__)
bp = Blueprint('settings', __name__, url_prefix='/settings')
bp = Blueprint('settings', __name__)
@bp.route('/general', methods=['GET'])

View File

@@ -4,7 +4,7 @@ import logging
from ..db import get_db
from .tasks import TaskScheduler
bp = Blueprint('tasks', __name__, url_prefix='/tasks')
bp = Blueprint('tasks', __name__)
logger = logging.getLogger(__name__)

View File

@@ -14,8 +14,7 @@ export default defineConfig({
proxy: {
'/api': {
target: 'http://backend:5000',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '')
changeOrigin: true
}
}
},