mirror of
https://github.com/actix/actix-website
synced 2025-01-22 16:15:56 +01:00
commit
9286357d2d
@ -278,7 +278,7 @@ use actix_web::{Either, Error, HttpResponse};
|
||||
|
||||
type RegisterResult = Either<HttpResponse, Box<Future<Item=HttpResponse, Error=Error>>>;
|
||||
|
||||
fn index(req: &HttpRequest) -> impl Responder {
|
||||
fn index(req: &HttpRequest) -> RegisterResult {
|
||||
if is_a_variant() { // <- choose variant A
|
||||
Either::A(
|
||||
HttpResponse::BadRequest().body("Bad data"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user