upgrading to actix-v4-beta

This commit is contained in:
realaravinth
2021-06-30 20:13:12 +05:30
parent 9ed458ebfa
commit 9f940c317a
24 changed files with 728 additions and 1192 deletions

View File

@@ -50,7 +50,7 @@ lazy_static! {
}
async fn error(path: web::Path<usize>) -> impl Responder {
let resp = match path.0 {
let resp = match path.into_inner() {
500 => HttpResponse::InternalServerError()
.content_type("text/html; charset=utf-8")
.body(&*INTERNAL_SERVER_ERROR_BODY),

View File

@@ -54,14 +54,8 @@ mod tests {
let (data, _, signin_resp) = register_and_signin(NAME, EMAIL, PASSWORD).await;
let cookies = get_cookie!(signin_resp);
let mut app = test::init_service(
App::new()
.wrap(get_identity_service())
.configure(crate::api::v1::services)
.configure(services)
.data(data.clone()),
)
.await;
let mut app = get_app!(data).await;
let urls = vec![
PAGES.home,

View File

@@ -66,7 +66,7 @@ pub async fn view_sitekey(
id: Identity,
) -> PageResult<impl Responder> {
let username = id.identity().unwrap();
let key = path.0;
let key = path.into_inner();
let config = sqlx::query_as!(
McaptchaConfig,