1
0
Fork 0
forked from alemi/upub

fix: remove again trailing slash

This commit is contained in:
əlemi 2024-04-23 05:30:10 +02:00
parent 2cb6cfd2f1
commit 1731bcb1c6
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 3 additions and 3 deletions

View file

@ -31,7 +31,7 @@ pub async fn view(
.set_preferred_username(Some(ctx.domain()))
.set_public_key(apb::Node::object(
serde_json::Value::new_object()
.set_id(Some(&url!(ctx, "/#main-key")))
.set_id(Some(&url!(ctx, "#main-key")))
.set_owner(Some(&url!(ctx, "")))
.set_public_key_pem(&ctx.app().public_key)
))

View file

@ -84,7 +84,7 @@ impl Context {
}
pub fn base(&self) -> String {
format!("{}{}/", self.0.protocol, self.0.domain)
format!("{}{}", self.0.protocol, self.0.domain)
}
pub fn uri(&self, entity: &str, id: String) -> String {

View file

@ -92,7 +92,7 @@ async fn worker(db: DatabaseConnection, domain: String, poll_interval: u64, mut
},
};
let key = if delivery.actor == format!("https://{domain}/") {
let key = if delivery.actor == format!("https://{domain}") {
let Some(model::application::Model { private_key: key, .. }) = model::application::Entity::find()
.one(&db).await?
else {