mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-04-20 23:07:01 +00:00
move security auth openapi stuff into the path
This commit is contained in:
parent
b4a7b4d810
commit
640bb8263c
3 changed files with 48 additions and 21 deletions
|
@ -89,9 +89,13 @@ fn delete(_state : &mut State, id : u64)
|
|||
}
|
||||
|
||||
#[rest_read_all(Auth)]
|
||||
fn auth_read_all(auth : AuthStatus<()>) -> Success<String>
|
||||
fn auth_read_all(auth : AuthStatus<()>) -> AuthResult<Success<String>>
|
||||
{
|
||||
format!("{:?}", auth).into()
|
||||
let str : Success<String> = match auth {
|
||||
AuthStatus::Authenticated(data) => format!("{:?}", data).into(),
|
||||
_ => return AuthErr
|
||||
};
|
||||
str.into()
|
||||
}
|
||||
|
||||
const ADDR : &str = "127.0.0.1:18080";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue