Centralize configuration and add some new config (#494)
Ideally, if someone could review the idea in [this comment](https://github.com/Plume-org/Plume/issues/273#issuecomment-474982184), I'd like to add the implementation to this pr too
This commit is contained in:
committed by
Baptiste Gelez
parent
b945d1f602
commit
65bb50e88f
@@ -31,7 +31,7 @@ use schema::posts;
|
||||
use search::Searcher;
|
||||
use tags::*;
|
||||
use users::User;
|
||||
use {ap_url, ApiResult, Connection, Error, Result, BASE_URL};
|
||||
use {ap_url, ApiResult, Connection, Error, Result, CONFIG};
|
||||
|
||||
pub type LicensedArticle = CustomObject<Licensed, Article>;
|
||||
|
||||
@@ -354,7 +354,7 @@ impl Post {
|
||||
if post.ap_url.is_empty() {
|
||||
post.ap_url = ap_url(&format!(
|
||||
"{}/~/{}/{}/",
|
||||
*BASE_URL,
|
||||
CONFIG.base_url,
|
||||
post.get_blog(conn)?.fqn,
|
||||
post.slug
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user