Can sign out

This commit is contained in:
2023-09-04 15:12:00 +02:00
parent 44d565c6da
commit d67f42abc5
9 changed files with 184 additions and 7 deletions

View File

@ -71,7 +71,7 @@ where
"Failed to extract authentication information from request! {e}"
);
return Ok(req
.into_response(HttpResponse::InternalServerError().finish())
.into_response(HttpResponse::PreconditionFailed().finish())
.map_into_right_body());
}
};
@ -81,7 +81,9 @@ where
"User attempted to access privileged route without authentication!"
);
return Ok(req
.into_response(HttpResponse::Unauthorized().json("Please authenticate!"))
.into_response(
HttpResponse::PreconditionFailed().json("Please authenticate!"),
)
.map_into_right_body());
}
}