import db from './index';

export function listContests(activeOnly) {
  return db.any('select * from contests');
}

export function getContest(contest_id) {
  return db.one('select * from contests where id = $1', [contest_id]);
}

export function createContest(title, start_time, end_time) {
  return db.one(
    'insert into contests(title, start_time, end_time, registration_mode) values($1, $2, $3, "code") returning id',
    [title, start_time, end_time],
  );
}

@@ -399,14 +399,10 @@
 $3, 
-%22code%22
+$4
 ) re
@@ -446,16 +446,24 @@
 end_time
+, 'code'
 %5D,%0A  );%0A

Update contest.js