changed certain datatypes for more sensible datatypes

This commit is contained in:
Arlo Filley 2022-10-31 23:18:57 +00:00
parent 7873f5acc5
commit 1b750c2cc0
2 changed files with 6 additions and 6 deletions

View File

@ -14,13 +14,13 @@ fn test() -> String {
#[serde(crate = "rocket::serde")] #[serde(crate = "rocket::serde")]
struct PostTest<'r> { struct PostTest<'r> {
test_type: &'r str, test_type: &'r str,
test_length: i64, test_length: u32,
test_time: i32, test_time: u32,
test_seed: i64, test_seed: i64,
quote_id: i32, quote_id: i32,
wpm: i16, wpm: u8,
accuracy: i8, accuracy: u8,
user_id: i32 user_id: u32
} }
#[post("/post_test", data = "<test>")] #[post("/post_test", data = "<test>")]

View File

@ -26,7 +26,7 @@ pub fn create_database() -> Result<()> {
Ok(()) 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<()> { -> Result<()> {
let connection = get_connection(); let connection = get_connection();