Files
Forge-Engine/routes/games/games_new.py
T
williamandwilliam 3f4ebc4527
Build and deploy / build-and-push (push) Successful in 17s
Build and deploy / deploy (push) Successful in 10s
first commit
2026-08-21 16:23:49 +02:00

15 lines
347 B
Python

from flask import request, redirect, url_for
import db
from core.flask_app import app
@app.route("/games/new", methods=["POST"])
def games_new():
name = request.form.get("name", "").strip()
if not name:
return redirect(url_for("index"))
slug = db.create_game(name)
return redirect(url_for("game_dashboard", slug=slug))