Open TQLeung opened 1 year ago
Can you give me an example of the code you want to write?
Can you give me an example of the code you want to write? @robjtede
something like this, thanks. can be one guard or array of guard.
guard(["crate::my_gruad::TokenGuard1","crate::my_gruad::TokenGuard2"])
web::scope("/recipe")
.service(item)
#[get("/item/{id}"), guard(["crate::my_gruad::TokenGuard1","crate::my_gruad::TokenGuard2"])] // HERE ! ^_^
pub async fn item(
app: web::Data<AppState>
) -> impl Responder {
......
}
Discussed in https://github.com/actix/actix-web/discussions/3140