mirror of
https://github.com/actix/actix-website
synced 2025-01-23 00:25:55 +01:00
commit
9286357d2d
@ -278,7 +278,7 @@ use actix_web::{Either, Error, HttpResponse};
|
|||||||
|
|
||||||
type RegisterResult = Either<HttpResponse, Box<Future<Item=HttpResponse, Error=Error>>>;
|
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
|
if is_a_variant() { // <- choose variant A
|
||||||
Either::A(
|
Either::A(
|
||||||
HttpResponse::BadRequest().body("Bad data"))
|
HttpResponse::BadRequest().body("Bad data"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user