[UPD] Added api to create Library

This commit is contained in:
2026-02-15 10:36:37 +01:00
parent bb8324ad1d
commit c468f51672
17 changed files with 142 additions and 9 deletions

24
app/routes/api/install.py Normal file
View File

@@ -0,0 +1,24 @@
from flask import request
from ...config import config, save_config
from ...api.actions.install import install
import logging
logger = logging.getLogger(__name__)
from .blueprint import api
@api.route("/install", methods=["POST"])
def post_install():
try:
body = request.json
except:
logger.debug("Installing with config.ini params")
else:
if body.get("query_string"):
config["DataBase"]["query"] = body.get("query_string")
save_config()
finally:
install()
return { "status": "ok" }, 200