Added macro export
This commit is contained in:
parent
1736e2d14d
commit
0ac5d17824
@ -4,11 +4,11 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
#proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
syn = "1.0"
|
syn = "1.0"
|
||||||
quote = "1.0"
|
#quote = "1.0"
|
||||||
#proc-macro2 = "1.0"
|
#proc-macro2 = "1.0"
|
||||||
|
|
||||||
dev-dtos = { git = "https://github.com/franklinblanco/user-svc-dtos-rust.git" }
|
dev-dtos = { git = "https://github.com/franklinblanco/user-svc-dtos-rust.git" }
|
||||||
|
@ -22,6 +22,8 @@ pub fn authenticated_route(_: TokenStream, mut input: TokenStream) -> TokenStrea
|
|||||||
input
|
input
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
#[allow(unused_macros)]
|
||||||
|
#[macro_export]
|
||||||
macro_rules! authenticate_route {
|
macro_rules! authenticate_route {
|
||||||
() => {
|
() => {
|
||||||
let header_conversion_result: dev_dtos::dtos::user::user_dtos::UserAuthHeader = match serde_json::from_str(match request.headers().get("authentication") {
|
let header_conversion_result: dev_dtos::dtos::user::user_dtos::UserAuthHeader = match serde_json::from_str(match request.headers().get("authentication") {
|
||||||
|
Loading…
Reference in New Issue
Block a user