diff options
| author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-07-13 07:28:42 -0400 |
|---|---|---|
| committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-07-13 07:28:42 -0400 |
| commit | fe6d45474a2024fb362ee59f7a38f827283ac0c4 (patch) | |
| tree | cc09092fac8bca86372939cabc61220b1e0e303c /src/main.rs | |
| parent | ba1ab61901e657903a34b0b0acecb81c12b5e0d0 (diff) | |
add: Persistent user id.
This will be used to limit users to one vote per quote.
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/main.rs b/src/main.rs index 026f610..e687255 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,17 +62,18 @@ fn main() { linoquotes_gamma::data::populate_test_db(&state.connection).unwrap(); } - for i in 1..1000 { - linoquotes_gamma::data::new_quote( - &state.connection, - "2017-07-10", - "orbekk", - &format!("another test {}", i), - ).unwrap(); - let qid = state.connection.last_insert_rowid(); - info!("Last inserted quote: {}", qid); - linoquotes_gamma::data::approve_quote(&state.connection, qid).unwrap(); - } + // for i in 1..1000 { + // linoquotes_gamma::data::new_quote( + // &state.connection, + // "2017-07-10", + // "orbekk", + // &format!("another test {}", i), + // ).unwrap(); + // let qid = state.connection.last_insert_rowid(); + // info!("Last inserted quote: {}", qid); + // linoquotes_gamma::data::approve_quote(&state.connection, qid).unwrap(); + // } + info!("Starting..."); linoquotes_gamma::server::serve(state, port); } |
