Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-du committed Jan 20, 2021
1 parent efec48f commit 64bac55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct ProxyClient {
impl Default for ProxyClient {
fn default() -> Self {
ProxyClient {
user_agent: "wikipedia (https://github.com/seppo0010/wikipedia-rs)".to_owned(),
user_agent: "Wiki Graph Search Service/v0.1.0/franics@francis.run/(https://github.com/francis-du/wiki-graph)".to_owned(),
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/handler/get_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use log::{error, info};
use rand::{thread_rng, Rng};
use serde::{Deserialize, Serialize};
use tide::Request;
use wikipedia::{Wikipedia};
use wikipedia::Wikipedia;

use crate::common::network::ProxyClient;
use crate::common::semantics;
Expand Down Expand Up @@ -106,7 +106,11 @@ pub async fn search(req: Request<()>) -> tide::Result {
}
}
Err(err) => {
error!("Search keyword `{}` wiki error,type => {:?}", words.clone(), err);
error!(
"Search keyword `{}` wiki error,type => {:?}",
words.clone(),
err
);
}
};
response.push(wiki_info);
Expand Down

0 comments on commit 64bac55

Please sign in to comment.