mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Change config pictrs key name (#2360)
This commit is contained in:
parent
d0a3d99636
commit
16fe149a6d
@ -73,7 +73,7 @@
|
|||||||
debug: false
|
debug: false
|
||||||
}
|
}
|
||||||
# Pictrs image server configuration.
|
# Pictrs image server configuration.
|
||||||
pictrs_config: {
|
pictrs: {
|
||||||
# Address where pictrs is available (for image hosting)
|
# Address where pictrs is available (for image hosting)
|
||||||
url: "http://pictrs:8080/"
|
url: "http://pictrs:8080/"
|
||||||
# Set a custom pictrs API key. ( Required for deleting images )
|
# Set a custom pictrs API key. ( Required for deleting images )
|
||||||
|
@ -101,7 +101,7 @@ impl Settings {
|
|||||||
|
|
||||||
pub fn pictrs_config(&self) -> Result<PictrsConfig, LemmyError> {
|
pub fn pictrs_config(&self) -> Result<PictrsConfig, LemmyError> {
|
||||||
self
|
self
|
||||||
.pictrs_config
|
.pictrs
|
||||||
.to_owned()
|
.to_owned()
|
||||||
.ok_or_else(|| anyhow!("images_disabled").into())
|
.ok_or_else(|| anyhow!("images_disabled").into())
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ pub struct Settings {
|
|||||||
pub federation: FederationConfig,
|
pub federation: FederationConfig,
|
||||||
/// Pictrs image server configuration.
|
/// Pictrs image server configuration.
|
||||||
#[default(Some(Default::default()))]
|
#[default(Some(Default::default()))]
|
||||||
pub(crate) pictrs_config: Option<PictrsConfig>,
|
pub(crate) pictrs: Option<PictrsConfig>,
|
||||||
#[default(Default::default())]
|
#[default(Default::default())]
|
||||||
pub captcha: CaptchaConfig,
|
pub captcha: CaptchaConfig,
|
||||||
/// Email sending configuration. All options except login/password are mandatory
|
/// Email sending configuration. All options except login/password are mandatory
|
||||||
@ -61,7 +61,7 @@ pub struct Settings {
|
|||||||
pub struct PictrsConfig {
|
pub struct PictrsConfig {
|
||||||
/// Address where pictrs is available (for image hosting)
|
/// Address where pictrs is available (for image hosting)
|
||||||
#[default(Url::parse("http://pictrs:8080").expect("parse pictrs url"))]
|
#[default(Url::parse("http://pictrs:8080").expect("parse pictrs url"))]
|
||||||
#[doku(example = "Url::parse(\"http://pictrs:8080\").unwrap()")]
|
#[doku(example = "http://pictrs:8080")]
|
||||||
pub url: Url,
|
pub url: Url,
|
||||||
|
|
||||||
/// Set a custom pictrs API key. ( Required for deleting images )
|
/// Set a custom pictrs API key. ( Required for deleting images )
|
||||||
|
Loading…
Reference in New Issue
Block a user