Browse Source

request.args -> request.form for POST

master
Ben Kurtovic 4 years ago
parent
commit
eedacfb594
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      app.py
  2. +1
    -1
      calefaction/modules/campaigns.py

+ 2
- 2
app.py View File

@@ -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 View File

@@ -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)


Loading…
Cancel
Save