Format
This commit is contained in:
parent
b5e528d8b8
commit
0e53631cc8
1 changed files with 1 additions and 6 deletions
|
|
@ -17,7 +17,6 @@ use crate::{
|
||||||
errors::{SyncServerError, permission_denied_error, unauthenticated_error},
|
errors::{SyncServerError, permission_denied_error, unauthenticated_error},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
pub async fn auth_middleware(
|
pub async fn auth_middleware(
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
Path(path_params): Path<HashMap<String, String>>,
|
Path(path_params): Path<HashMap<String, String>>,
|
||||||
|
|
@ -37,11 +36,7 @@ pub async fn auth_middleware(
|
||||||
Ok(next.run(req).await)
|
Ok(next.run(req).await)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn auth(
|
pub fn auth(state: &AppState, token: &str, vault_id: &VaultId) -> Result<User, SyncServerError> {
|
||||||
state: &AppState,
|
|
||||||
token: &str,
|
|
||||||
vault_id: &VaultId,
|
|
||||||
) -> Result<User, SyncServerError> {
|
|
||||||
let user = state
|
let user = state
|
||||||
.config
|
.config
|
||||||
.users
|
.users
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue