This commit is contained in:
2021-09-11 17:49:27 -04:00
parent 1a51323c03
commit c3144df7c7
4 changed files with 51 additions and 6 deletions
+3 -2
View File
@@ -26,7 +26,6 @@ pub mod defs {
use chrono::naive::{NaiveDate, NaiveTime};
use rocket::{http::RawStr, request::FromFormValue};
use std::ops::Deref;
use rocket::response::NamedFile;
#[derive(Debug)]
pub struct DateForm(NaiveDate);
@@ -74,6 +73,8 @@ pub mod defs {
Ok(n) => n,
Err(_) => return Err(()),
};
// 3:15 PM
// 5:18 AM
let naivedate = NaiveTime::parse_from_str(&value_uri[..], "%I:%M %p");
match naivedate {
Ok(n) => Ok(TimeForm(n)),
@@ -132,7 +133,7 @@ pub mod defs {
Ok(Image(String::from("pepega")))
*/
let mut value_uri = match value.url_decode() {
let value_uri = match value.url_decode() {
Ok(n) => n,
Err(_) => return Err(()),
};