Browse Source
Fixed change in organizations header, now Request::get_param() are indexed by segment, not dynamic parameter.
pull/284/head
Daniel García
6 years ago
No known key found for this signature in database
GPG Key ID: FC8A7D14C3CD543A
1 changed files with
2 additions and
2 deletions
-
src/auth.rs
|
@ -195,8 +195,8 @@ impl<'a, 'r> FromRequest<'a, 'r> for OrgHeaders { |
|
|
Outcome::Forward(f) => Outcome::Forward(f), |
|
|
Outcome::Forward(f) => Outcome::Forward(f), |
|
|
Outcome::Failure(f) => Outcome::Failure(f), |
|
|
Outcome::Failure(f) => Outcome::Failure(f), |
|
|
Outcome::Success(headers) => { |
|
|
Outcome::Success(headers) => { |
|
|
// org_id is expected to be the first dynamic param
|
|
|
// org_id is expected to be the second param ("/organizations/<org_id>")
|
|
|
match request.get_param::<String>(0) { |
|
|
match request.get_param::<String>(1) { |
|
|
Some(Ok(org_id)) => { |
|
|
Some(Ok(org_id)) => { |
|
|
let conn = match request.guard::<DbConn>() { |
|
|
let conn = match request.guard::<DbConn>() { |
|
|
Outcome::Success(conn) => conn, |
|
|
Outcome::Success(conn) => conn, |
|
|