localUrl only from manifest

This commit is contained in:
Jaco Greeff 2017-11-20 15:11:12 +01:00
parent ac722e9e50
commit 73dcde65aa
5 changed files with 4 additions and 5 deletions

View File

@ -38,7 +38,6 @@ pub struct Info {
pub author: &'static str, pub author: &'static str,
pub description: &'static str, pub description: &'static str,
pub icon_url: &'static str, pub icon_url: &'static str,
pub local_url: &'static str,
} }
pub trait WebApp : Default + Send + Sync { pub trait WebApp : Default + Send + Sync {

View File

@ -27,7 +27,7 @@ pub struct App {
#[serde(rename="iconUrl")] #[serde(rename="iconUrl")]
pub icon_url: String, pub icon_url: String,
#[serde(rename="localUrl")] #[serde(rename="localUrl")]
pub local_url: String, pub local_url: Option<String>,
} }
impl App { impl App {

View File

@ -56,7 +56,7 @@ fn read_manifest(name: &str, mut path: PathBuf) -> EndpointInfo {
version: "0.0.0".into(), version: "0.0.0".into(),
author: "?".into(), author: "?".into(),
icon_url: "icon.png".into(), icon_url: "icon.png".into(),
local_url: "".into(), local_url: None,
} }
}) })
} }

View File

@ -44,7 +44,7 @@ pub struct EndpointInfo {
pub version: String, pub version: String,
pub author: String, pub author: String,
pub icon_url: String, pub icon_url: String,
pub local_url: String, pub local_url: Option<String>,
} }
pub type Endpoints = BTreeMap<String, Box<Endpoint>>; pub type Endpoints = BTreeMap<String, Box<Endpoint>>;

View File

@ -132,7 +132,7 @@ impl From<Info> for EndpointInfo {
description: info.description.into(), description: info.description.into(),
author: info.author.into(), author: info.author.into(),
icon_url: info.icon_url.into(), icon_url: info.icon_url.into(),
local_url: info.local_url.into(), local_url: None,
version: info.version.into(), version: info.version.into(),
} }
} }