Support both versions.

This commit is contained in:
Tomasz Drwięga
2017-10-17 18:07:21 +02:00
parent 0f8fb62581
commit 304b067417
10 changed files with 63 additions and 65 deletions

View File

@@ -78,11 +78,8 @@ pub fn all_endpoints<F: Fetch>(
// NOTE [ToDr] Dapps will be currently embeded on 8180
insert::<parity_ui::App>(&mut pages, "ui", Embeddable::Yes(embeddable.clone()), pool.clone());
// old version
{
let mut endpoint = PageEndpoint::new_safe_to_embed(parity_ui::old::App::default(), embeddable.clone());
endpoint.prefix = Some("v1".into());
pages.insert("v1".into(), Box::new(endpoint));
}
insert::<parity_ui::old::App>(&mut pages, "v1", Embeddable::Yes(embeddable.clone()), pool.clone());
pages.insert("proxy".into(), ProxyPac::boxed(embeddable.clone(), dapps_domain.to_owned()));
pages.insert(WEB_PATH.into(), Web::boxed(embeddable.clone(), web_proxy_tokens.clone(), fetch.clone()));