Skip to content

Commit

Permalink
Improve the styles and proxy codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
yjcyxky committed Apr 7, 2024
1 parent 4a7aff7 commit 46a586e
Show file tree
Hide file tree
Showing 6 changed files with 363 additions and 110 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sqlx = { version = "0.6.3", features = [
"json"
] }
include_dir = "0.7.3"
regex = "1"
regex = "1.10.4"
csv = "1.1.6"
tempfile = "3.2.0"
neo4rs = "0.6.2"
Expand Down
8 changes: 5 additions & 3 deletions src/bin/biomedgps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ use biomedgps::model::core::EntityMetadata;
use biomedgps::model::kge::init_kge_models;
use biomedgps::model::llm::init_prompt_templates;
use biomedgps::model::util::update_existing_colors;
use biomedgps::proxy::website::{proxy_website, proxy_website_data};
use biomedgps::proxy::website::{
proxy_website, proxy_website_data, PROXY_DATA_PREFIX, PROXY_PREFIX,
};
use biomedgps::{check_db_version, connect_db, connect_graph_db, init_logger};
use dotenv::dotenv;
use itertools::Itertools;
Expand Down Expand Up @@ -343,10 +345,10 @@ async fn main() -> Result<(), std::io::Error> {
};

// Proxy website. such as /proxy/sanger_cosmic?gene_symbol=TP53. if you want to know more about the proxy website and query parameters, please check the website module.
let route = route.at("/proxy/*", get(proxy_website));
let route = route.at(format!("{}/*", PROXY_PREFIX), get(proxy_website));
// All other requests related to the proxy website will be transferred to the proxy-data route.
let route = route.at(
"/proxy-data/*",
format!("{}/*", PROXY_DATA_PREFIX),
get(proxy_website_data).post(proxy_website_data),
);

Expand Down
Loading

0 comments on commit 46a586e

Please sign in to comment.