Commit 842d7edc authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Move ballot reference to VOTING_SERVICES

parent ae916dbe
...@@ -280,7 +280,6 @@ module SSite = struct ...@@ -280,7 +280,6 @@ module SSite = struct
| None -> | None ->
Html5.register ~service:home Html5.register ~service:home
(fun () () -> (fun () () ->
Eliom_reference.unset ballot >>
Eliom_reference.unset saved_service >> Eliom_reference.unset saved_service >>
lwt featured = get_featured_elections () in lwt featured = get_featured_elections () in
T.index ~featured T.index ~featured
...@@ -288,7 +287,6 @@ module SSite = struct ...@@ -288,7 +287,6 @@ module SSite = struct
| Some uuid -> | Some uuid ->
Redirection.register ~service:home Redirection.register ~service:home
(fun () () -> (fun () () ->
Eliom_reference.unset ballot >>
Eliom_reference.unset saved_service >> Eliom_reference.unset saved_service >>
return (preapply S.election_dir (uuid, ESIndex)) return (preapply S.election_dir (uuid, ESIndex))
) )
...@@ -444,7 +442,6 @@ module SElection = struct ...@@ -444,7 +442,6 @@ module SElection = struct
| _ -> forbidden () | _ -> forbidden ()
let f_index uuid election user () = let f_index uuid election user () =
Eliom_reference.unset ballot >>
T.election_view ~election ~user T.election_view ~election ~user
let handle_pseudo_file u f = let handle_pseudo_file u f =
...@@ -510,6 +507,10 @@ module SVoting = struct ...@@ -510,6 +507,10 @@ module SVoting = struct
~post_params:(opt (string "encrypted_vote") ** opt (file "encrypted_vote_file")) ~post_params:(opt (string "encrypted_vote") ** opt (file "encrypted_vote_file"))
() ()
let ballot = Eliom_reference.eref
~scope:Eliom_common.default_session_scope
(None : string option)
end end
module Register (S : ALL_SERVICES) (T : TEMPLATES) : EMPTY = struct module Register (S : ALL_SERVICES) (T : TEMPLATES) : EMPTY = struct
......
...@@ -24,10 +24,6 @@ open Serializable_t ...@@ -24,10 +24,6 @@ open Serializable_t
open Eliom_service open Eliom_service
open Eliom_parameter open Eliom_parameter
let ballot = Eliom_reference.eref
~scope:Eliom_common.default_session_scope
(None : string option)
let uuid = Eliom_parameter.user_type let uuid = Eliom_parameter.user_type
(fun x -> match Uuidm.of_string x with (fun x -> match Uuidm.of_string x with
| Some x -> x | Some x -> x
......
...@@ -171,6 +171,8 @@ module type VOTING_SERVICES = sig ...@@ -171,6 +171,8 @@ module type VOTING_SERVICES = sig
[< Eliom_service.registrable > `Registrable ], 'a) [< Eliom_service.registrable > `Registrable ], 'a)
Eliom_service.service Eliom_service.service
val ballot : string option Eliom_reference.eref
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment