Commit f960113f authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Move election_file param declaration to Web_common, for consistency

parent c4f68c66
......@@ -365,16 +365,11 @@ module SElection = struct
open Eliom_service
open Eliom_parameter
let election_file = Eliom_parameter.user_type
election_file_of_string
string_of_election_file
"file"
module Services : ELECTION_SERVICES = struct
let election_dir = service
~path:["elections"]
~get_params:(suffix (uuid "uuid" ** election_file))
~get_params:(suffix (uuid "uuid" ** election_file "file"))
()
let election_file e f = preapply election_dir (e.e_uuid, f)
......
......@@ -197,3 +197,7 @@ let string_of_election_file = function
| ESCreds -> "public_creds.txt"
| ESBallots -> "ballots.jsons"
| ESRecords -> "records"
let election_file = Eliom_parameter.user_type
~of_string:election_file_of_string
~to_string:string_of_election_file
......@@ -86,3 +86,9 @@ type election_file =
val election_file_of_string : string -> election_file
val string_of_election_file : election_file -> string
val election_file :
string ->
(election_file, [ `WithoutSuffix ],
[ `One of election_file ] Eliom_parameter.param_name)
Eliom_parameter.params_type
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