Change the signature of ap_url to be backward-compatible

This commit is contained in:
Bat 2018-06-26 17:32:35 +02:00
parent f58bc1d8f1
commit 9a825e7066
2 changed files with 2 additions and 3 deletions

View File

@ -92,7 +92,7 @@ lazy_static! {
pub static ref USE_HTTPS: bool = env::var("USE_HTTPS").map(|val| val == "1").unwrap_or(true);
}
pub fn ap_url(url: &str) -> String {
pub fn ap_url(url: String) -> String {
let scheme = if *USE_HTTPS {
"https"
} else {

View File

@ -3,8 +3,7 @@ use rocket::response::Content;
use serde_json;
use webfinger::*;
use plume_common::activity_pub::ap_url;
use plume_models::{BASE_URL, db_conn::DbConn, blogs::Blog, users::User};
use plume_models::{BASE_URL, ap_url, db_conn::DbConn, blogs::Blog, users::User};
#[get("/.well-known/nodeinfo")]
fn nodeinfo() -> Content<String> {