Browse Source

Fixed fake petitions signing flow

Jim Barritt 11 months ago
parent
commit
f98fd02e21

+ 1 - 0
apps/petitions/decode-app/src/decode_app/handler.clj

@@ -56,6 +56,7 @@
56 56
                          :petitions { :url (local-url request "/petitions") :description {:get "List of all petitions" :post "Create a new petition"}}
57 57
                          :petition { :url (local-url request "/petitions/:id") :description "Retrieves a particular petition by id"}
58 58
                          :close-petition {:url (local-url request "/close") :description {:post  "Close a petition (send id in body)"}}
59
+                         ;; These pages were transitional before we had the mobile app.
59 60
                          :sign-petition {:url (local-url request "/sign/petitions/:id") :description "Html form for signing a petition"}
60 61
                          :login {:url (local-url request "/auth/in") :description "Html Login form"}
61 62
                          :logout {:url (local-url request "/auth/out") :description "Logout action (Just invoke GET)"}}))

+ 1 - 1
apps/petitions/decode-app/src/views/contents.clj

@@ -42,7 +42,7 @@
42 42
     [:h4 "Close date"]
43 43
     [:p (format-date (:closingDate petition))]]
44 44
    (form-to {}
45
-     [:post (format "/sign/petitions/%s" (:id petition))]
45
+     [:get (format "/sign/petitions/%s/confirmation" (:id petition))]
46 46
      [:button {:class "sign-button" :id "submit"} "Sign petition"])])
47 47
 
48 48
 (defn sign-petition-confirmation [email current-url petition]