Commit 7597951e authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Create session in DB when starting a contest (fixes #31)

parent d6ae5885
Pipeline #125 passed with stages
in 16 minutes and 42 seconds
......@@ -297,9 +297,11 @@ pub fn show_contest_results<T: MedalConnection>(conn: &T, contest_id: u32, sessi
//TODO: use csrf_token
pub fn start_contest<T: MedalConnection>(conn: &T, contest_id: u32, session_token: String, _csrf_token: String)
-> MedalResult<()> {
//TODO: use data
//TODO: use data or remove?
let _data = json_val::Map::new();
let _ = conn.get_session_or_new(&session_token);
match conn.new_participation(&session_token, contest_id) {
Ok(_) => Ok(()),
_ => Err(MedalError::AccessDenied),
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