remove /uploaded

This commit is contained in:
Mylloon 2022-10-27 17:36:39 +02:00
parent 299c7fc7d7
commit df488e667b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 1 additions and 12 deletions

View file

@ -5,11 +5,9 @@ from config import init
from routes.api.download import router as api_download from routes.api.download import router as api_download
from routes.api.upload import router as api_upload from routes.api.upload import router as api_upload
from routes.index import router as index from routes.index import router as index
from routes.uploaded import router as uploaded
app = Flask(__name__, static_url_path="/", static_folder="public") app = Flask(__name__, static_url_path="/", static_folder="public")
app.register_blueprint(index, url_prefix="/index") app.register_blueprint(index, url_prefix="/index")
app.register_blueprint(uploaded, url_prefix="/uploaded")
app.register_blueprint(api_upload, url_prefix="/api/upload") app.register_blueprint(api_upload, url_prefix="/api/upload")
app.register_blueprint(api_download, url_prefix="/api/download") app.register_blueprint(api_download, url_prefix="/api/download")

View file

@ -16,4 +16,4 @@ def upload() -> Response:
with open(f"{Config.uploads_dir}/{data_hash}", "w") as f: with open(f"{Config.uploads_dir}/{data_hash}", "w") as f:
f.write(data) f.write(data)
return redirect("/uploaded") return redirect("/index")

View file

@ -1,9 +0,0 @@
from config import Config
from flask import Blueprint, render_template
router = Blueprint("uploaded", __name__)
@router.route("")
def uploaded() -> str:
return render_template("index.html", config=Config)