mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-22 17:41:09 +00:00
Should use Utc::now for last_refreshed_at
This commit is contained in:
parent
5d47bb96ba
commit
026c8c81f2
4 changed files with 8 additions and 8 deletions
|
@ -14,7 +14,7 @@ use activitypub_federation::{
|
||||||
http_signatures::generate_actor_keypair,
|
http_signatures::generate_actor_keypair,
|
||||||
};
|
};
|
||||||
use bcrypt::{hash, DEFAULT_COST};
|
use bcrypt::{hash, DEFAULT_COST};
|
||||||
use chrono::{DateTime, Local, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use diesel::{
|
use diesel::{
|
||||||
insert_into,
|
insert_into,
|
||||||
AsChangeset,
|
AsChangeset,
|
||||||
|
@ -83,7 +83,7 @@ impl DbPerson {
|
||||||
inbox_url,
|
inbox_url,
|
||||||
public_key: keypair.public_key,
|
public_key: keypair.public_key,
|
||||||
private_key: Some(keypair.private_key),
|
private_key: Some(keypair.private_key),
|
||||||
last_refreshed_at: Local::now().into(),
|
last_refreshed_at: Utc::now(),
|
||||||
local: true,
|
local: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ use activitypub_federation::{
|
||||||
protocol::{public_key::PublicKey, verification::verify_domains_match},
|
protocol::{public_key::PublicKey, verification::verify_domains_match},
|
||||||
traits::{ActivityHandler, Actor, Object},
|
traits::{ActivityHandler, Actor, Object},
|
||||||
};
|
};
|
||||||
use chrono::{DateTime, Local, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
@ -110,7 +110,7 @@ impl Object for DbInstance {
|
||||||
inbox_url: json.inbox.to_string(),
|
inbox_url: json.inbox.to_string(),
|
||||||
public_key: json.public_key.public_key_pem,
|
public_key: json.public_key.public_key_pem,
|
||||||
private_key: None,
|
private_key: None,
|
||||||
last_refreshed_at: Local::now().into(),
|
last_refreshed_at: Utc::now(),
|
||||||
local: false,
|
local: false,
|
||||||
};
|
};
|
||||||
let instance = DbInstance::create(&form, data)?;
|
let instance = DbInstance::create(&form, data)?;
|
||||||
|
|
|
@ -12,7 +12,7 @@ use activitypub_federation::{
|
||||||
protocol::{public_key::PublicKey, verification::verify_domains_match},
|
protocol::{public_key::PublicKey, verification::verify_domains_match},
|
||||||
traits::{Actor, Object},
|
traits::{Actor, Object},
|
||||||
};
|
};
|
||||||
use chrono::{DateTime, Local, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
@ -71,7 +71,7 @@ impl Object for DbPerson {
|
||||||
inbox_url: json.inbox.to_string(),
|
inbox_url: json.inbox.to_string(),
|
||||||
public_key: json.public_key.public_key_pem,
|
public_key: json.public_key.public_key_pem,
|
||||||
private_key: None,
|
private_key: None,
|
||||||
last_refreshed_at: Local::now().into(),
|
last_refreshed_at: Utc::now(),
|
||||||
local: false,
|
local: false,
|
||||||
};
|
};
|
||||||
DbPerson::create(&form, data)
|
DbPerson::create(&form, data)
|
||||||
|
|
|
@ -32,7 +32,7 @@ use axum::{
|
||||||
ServiceExt,
|
ServiceExt,
|
||||||
};
|
};
|
||||||
use axum_macros::debug_middleware;
|
use axum_macros::debug_middleware;
|
||||||
use chrono::Local;
|
use chrono::Utc;
|
||||||
use diesel::{
|
use diesel::{
|
||||||
r2d2::{ConnectionManager, Pool},
|
r2d2::{ConnectionManager, Pool},
|
||||||
PgConnection,
|
PgConnection,
|
||||||
|
@ -133,7 +133,7 @@ async fn setup(data: &Data<IbisData>) -> Result<(), Error> {
|
||||||
inbox_url,
|
inbox_url,
|
||||||
public_key: keypair.public_key,
|
public_key: keypair.public_key,
|
||||||
private_key: Some(keypair.private_key),
|
private_key: Some(keypair.private_key),
|
||||||
last_refreshed_at: Local::now().into(),
|
last_refreshed_at: Utc::now(),
|
||||||
local: true,
|
local: true,
|
||||||
};
|
};
|
||||||
let instance = DbInstance::create(&form, data)?;
|
let instance = DbInstance::create(&form, data)?;
|
||||||
|
|
Loading…
Reference in a new issue