changed certain datatypes for more sensible datatypes
This commit is contained in:
parent
7873f5acc5
commit
1b750c2cc0
10
src/main.rs
10
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 = "<test>")]
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user