Fetchable dapps (#1949)

* Fetching dapp from github.

* Unpacking dapp

* Removing hardcodes

* Proper Host validation

* Randomizing paths

* Splitting into files

* Serving donwloaded apps from different path

* Extracting URLHint to separate module

* Whitespace and docs
This commit is contained in:
Tomasz Drwięga
2016-08-18 12:19:09 +02:00
committed by Gav Wood
parent 57dbdaada9
commit 0620a03e56
17 changed files with 941 additions and 22 deletions

View File

@@ -16,7 +16,7 @@
use endpoint::EndpointInfo;
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
pub struct App {
pub id: String,
pub name: String,
@@ -41,6 +41,18 @@ impl App {
}
}
impl Into<EndpointInfo> for App {
fn into(self) -> EndpointInfo {
EndpointInfo {
name: self.name,
description: self.description,
version: self.version,
author: self.author,
icon_url: self.icon_url,
}
}
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ApiError {
pub code: String,