mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +02:00
Accept &str for Redirect (#889)
* Accept &str for Redirect * Fix doc example * fix more docs examples * update changelog * fix changelog label Co-authored-by: David Pedersen <[email protected]>
This commit is contained in:
co-authored by
David Pedersen
parent
79501afd10
commit
3084dc10ca
@@ -45,7 +45,7 @@ pub use cookie_lib::{Cookie, Key};
|
||||
/// // the updated jar must be returned for the changes
|
||||
/// // to be included in the response
|
||||
/// jar.add(Cookie::new("session_id", session_id)),
|
||||
/// Redirect::to("/me".parse().unwrap()),
|
||||
/// Redirect::to("/me"),
|
||||
/// ))
|
||||
/// } else {
|
||||
/// Err(StatusCode::UNAUTHORIZED)
|
||||
@@ -214,7 +214,7 @@ impl IntoResponse for CookieJar {
|
||||
/// // the updated jar must be returned for the changes
|
||||
/// // to be included in the response
|
||||
/// jar.add(Cookie::new("session_id", session_id)),
|
||||
/// Redirect::to("/me".parse().unwrap()),
|
||||
/// Redirect::to("/me"),
|
||||
/// ))
|
||||
/// } else {
|
||||
/// Err(StatusCode::UNAUTHORIZED)
|
||||
|
||||
Reference in New Issue
Block a user