This commit is contained in:
2021-09-01 21:10:14 -04:00
parent e112f5a33c
commit c52ff45a82
5 changed files with 48 additions and 10 deletions
+14 -1
View File
@@ -1,10 +1,11 @@
use cms_macro::api_route;
use rocket::{
http::{RawStr, Status},
request::FromParam,
};
use std::borrow::Cow;
use cms_macro::api_route;
pub struct Lang<'a>(Cow<'a, str>);
fn valid_lang(lang: &str) -> bool {
@@ -52,6 +53,7 @@ pub mod defs {
}
}
}
}
api_route! {
@@ -63,3 +65,14 @@ api_route! {
}
}
/*
api_route! {
teachers {
name: (Text, String, String),
emails: (Array<Text>, Vec<String>, Vec<String>),
}
}
*/
//TODO: fix value parsing to read a TokenStream until the `,` to allow for containerized types in
//the macro