From 091208b66c733aba10da6a103a55622dbea83992 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Fri, 29 Nov 2019 14:47:12 +0100 Subject: [PATCH] Make `kfet.account.read.json` accessible with GET --- kfet/urls.py | 6 +++++- kfet/views.py | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kfet/urls.py b/kfet/urls.py index 681b7c31..03c174f3 100644 --- a/kfet/urls.py +++ b/kfet/urls.py @@ -239,7 +239,11 @@ urlpatterns = [ # JSON urls # ----- path("history.json", views.history_json, name="kfet.history.json"), - path("accounts/read.json", views.account_read_json, name="kfet.account.read.json"), + path( + "accounts//.json", + views.account_read_json, + name="kfet.account.read.json", + ), # ----- # Settings urls # ----- diff --git a/kfet/views.py b/kfet/views.py index c5d5082b..0861964e 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -905,8 +905,7 @@ def kpsul_get_settings(request): @teamkfet_required -def account_read_json(request): - trigramme = request.POST.get("trigramme", "") +def account_read_json(request, trigramme): account = get_object_or_404(Account, trigramme=trigramme) data = { "id": account.pk,