mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-22 10:51:02 +01:00
refactor: remove URL prefixes from blueprints in the application
This commit is contained in:
@@ -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'])
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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__)
|
||||
|
||||
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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__)
|
||||
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@ export default defineConfig({
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://backend:5000',
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, '')
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user