first commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from flask import jsonify
|
||||
|
||||
import screens
|
||||
|
||||
from core.flask_app import app
|
||||
|
||||
|
||||
@app.route("/game/<slug>/actions/<int:action_id>/run-data", methods=["POST"])
|
||||
def action_run_data(slug, action_id):
|
||||
"""Exécuté côté serveur au moment du clic, en mode jouable, pour une
|
||||
action "Modifier une donnée d'un objet" — les actions "Modifier un
|
||||
élément" restent, elles, purement côté client (juste du style CSS)."""
|
||||
action = screens.get_action(slug, action_id)
|
||||
if not action or action.get("action_type") != "modifier_donnee":
|
||||
return jsonify({"ok": False}), 400
|
||||
ok = screens.apply_data_action(slug, action)
|
||||
return jsonify({"ok": ok})
|
||||
Reference in New Issue
Block a user