mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-28 01:52:57 +01:00
fix doc tests
This commit is contained in:
parent
be9031c55e
commit
3a2035a121
@ -26,7 +26,7 @@
|
|||||||
//! }
|
//! }
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! fn login(id: Idenity) -> HttpResponse {
|
//! fn login(id: Identity) -> HttpResponse {
|
||||||
//! id.remember("User1".to_owned()); // <- remember identity
|
//! id.remember("User1".to_owned()); // <- remember identity
|
||||||
//! HttpResponse::Ok().finish()
|
//! HttpResponse::Ok().finish()
|
||||||
//! }
|
//! }
|
||||||
@ -41,11 +41,10 @@
|
|||||||
//! // <- create identity middleware
|
//! // <- create identity middleware
|
||||||
//! CookieIdentityPolicy::new(&[0; 32]) // <- create cookie session backend
|
//! CookieIdentityPolicy::new(&[0; 32]) // <- create cookie session backend
|
||||||
//! .name("auth-cookie")
|
//! .name("auth-cookie")
|
||||||
//! .secure(false))
|
//! .secure(false)))
|
||||||
//! .service(web::resource("/index.html").to(index)
|
//! .service(web::resource("/index.html").to(index))
|
||||||
//! .service(web::resource("/login.html").to(login)
|
//! .service(web::resource("/login.html").to(login))
|
||||||
//! .service(web::resource("/logout.html").to(logout)
|
//! .service(web::resource("/logout.html").to(logout));
|
||||||
//! ));
|
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
Loading…
Reference in New Issue
Block a user