diff --git a/src/main.rs b/src/main.rs index 4a39804..8c68be1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,13 +14,13 @@ fn test() -> String { #[serde(crate = "rocket::serde")] struct PostTest<'r> { test_type: &'r str, - test_length: i64, - test_time: i32, + test_length: u32, + test_time: u32, test_seed: i64, quote_id: i32, - wpm: i16, - accuracy: i8, - user_id: i32 + wpm: u8, + accuracy: u8, + user_id: u32 } #[post("/post_test", data = "")] diff --git a/src/sql.rs b/src/sql.rs index 8a3533a..05b0968 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -26,7 +26,7 @@ pub fn create_database() -> Result<()> { Ok(()) } -pub fn post_test(test_type: &str, test_length: i64, test_time: i32, test_seed: i64, quote_id: i32, wpm: i16, accuracy: i8, user_id: i32) +pub fn post_test(test_type: &str, test_length: u32, test_time: u32, test_seed: i64, quote_id: i32, wpm: u8, accuracy: u8, user_id: u32) -> Result<()> { let connection = get_connection();