Insert domain into invite
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
170b037248
commit
6621a09ec9
|
@ -1079,7 +1079,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "golgi"
|
name = "golgi"
|
||||||
version = "0.1.4"
|
version = "0.1.4"
|
||||||
source = "git+https://git.coopcloud.tech/golgi-ssb/golgi.git#ca4c1114ddf328b818144c5a1af0187b1357e9be"
|
source = "git+https://git.coopcloud.tech/golgi-ssb/golgi#ca4c1114ddf328b818144c5a1af0187b1357e9be"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-std",
|
"async-std",
|
||||||
"async-stream 0.3.3",
|
"async-stream 0.3.3",
|
||||||
|
@ -2331,7 +2331,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "peach-web"
|
name = "peach-web"
|
||||||
version = "0.6.18"
|
version = "0.6.19"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-std",
|
"async-std",
|
||||||
"base64 0.13.0",
|
"base64 0.13.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "peach-web"
|
name = "peach-web"
|
||||||
version = "0.6.18"
|
version = "0.6.19"
|
||||||
authors = ["Andrew Reid <gnomad@cryptolab.net>", "Max Fowler <max@mfowler.info>"]
|
authors = ["Andrew Reid <gnomad@cryptolab.net>", "Max Fowler <max@mfowler.info>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "peach-web is a web application which provides a web interface for monitoring and interacting with the PeachCloud device. This allows administration of the single-board computer (ie. Raspberry Pi) running PeachCloud, as well as the ssb-server and related plugins."
|
description = "peach-web is a web application which provides a web interface for monitoring and interacting with the PeachCloud device. This allows administration of the single-board computer (ie. Raspberry Pi) running PeachCloud, as well as the ssb-server and related plugins."
|
||||||
|
|
|
@ -157,7 +157,13 @@ pub fn create_invite(uses: u16) -> Result<String, Box<dyn Error>> {
|
||||||
let mut sbot_client = init_sbot_with_config(&sbot_config).await?;
|
let mut sbot_client = init_sbot_with_config(&sbot_config).await?;
|
||||||
|
|
||||||
debug!("Generating Scuttlebutt invite code");
|
debug!("Generating Scuttlebutt invite code");
|
||||||
let invite_code = sbot_client.invite_create(uses).await?;
|
let mut invite_code = sbot_client.invite_create(uses).await?;
|
||||||
|
|
||||||
|
// insert domain into invite if one is configured
|
||||||
|
let domain = config_manager::get_config_value("EXTERNAL_DOMAIN")?;
|
||||||
|
if !domain.is_empty() {
|
||||||
|
invite_code = domain + &invite_code[4..];
|
||||||
|
}
|
||||||
|
|
||||||
Ok(invite_code)
|
Ok(invite_code)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue