Parcourir la source

request.args -> request.form for POST

master
Ben Kurtovic il y a 8 ans
Parent
révision
eedacfb594
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. +2
    -2
      app.py
  2. +1
    -1
      calefaction/modules/campaigns.py

+ 2
- 2
app.py Voir le fichier

@@ -65,8 +65,8 @@ def index():
@app.catch_exceptions
def login():
"""Handle the last step of a SSO login request."""
code = request.args.get("code")
state = request.args.get("state")
code = request.values.get("code")
state = request.values.get("state")

success, caught = try_func(lambda: auth.handle_login(code, state))
if success:


+ 1
- 1
calefaction/modules/campaigns.py Voir le fichier

@@ -38,7 +38,7 @@ def campaign():
@blueprint.rroute("/settings/campaign", methods=["POST"])
def set_campaign():
"""Update the user's currently selected campaign."""
campaign = request.args.get("campaign")
campaign = request.form.get("campaign")
if campaign not in config["enabled"]:
abort(400)
g.auth.set_character_modprop("campaigns", "current", campaign)


Chargement…
Annuler
Enregistrer