mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-12 02:25:41 +00:00
upgrading to actix-v4-beta
This commit is contained in:
@@ -226,7 +226,6 @@ async fn signout(id: Identity) -> impl Responder {
|
||||
id.forget();
|
||||
}
|
||||
HttpResponse::Found()
|
||||
.header(header::LOCATION, "/login")
|
||||
.append_header((header::LOCATION, "/login"))
|
||||
.finish()
|
||||
.into_body()
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ use crate::errors::*;
|
||||
use crate::AppData;
|
||||
|
||||
pub struct Notification {
|
||||
pub name: String,
|
||||
pub heading: String,
|
||||
pub message: String,
|
||||
pub received: OffsetDateTime,
|
||||
pub id: i32,
|
||||
pub name: Option<String>,
|
||||
pub heading: Option<String>,
|
||||
pub message: Option<String>,
|
||||
pub received: Option<OffsetDateTime>,
|
||||
pub id: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
@@ -43,11 +43,11 @@ pub struct NotificationResp {
|
||||
impl From<Notification> for NotificationResp {
|
||||
fn from(n: Notification) -> Self {
|
||||
NotificationResp {
|
||||
name: n.name,
|
||||
heading: n.heading,
|
||||
received: n.received.unix_timestamp(),
|
||||
id: n.id,
|
||||
message: n.message,
|
||||
name: n.name.unwrap(),
|
||||
heading: n.heading.unwrap(),
|
||||
received: n.received.unwrap().unix_timestamp(),
|
||||
id: n.id.unwrap(),
|
||||
message: n.message.unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn feature() {
|
||||
actix_rt::System::new("trest")
|
||||
actix_rt::System::new()
|
||||
.block_on(async move { get_pow_config_works().await });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user