1
0
Fork 0
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:
Dominic 2020-02-10 21:17:49 +01:00
parent b4a7b4d810
commit 640bb8263c
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
3 changed files with 48 additions and 21 deletions

View file

@ -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";