generated from OBJNULL/Dockerized-Rust
Removed legacy name & database
This commit is contained in:
parent
050738cbfe
commit
f13e99990a
2 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ pub struct API {
|
|||
async fn receive_request(params: HashMap<String, String>, api: Arc<API>) -> Result<impl warp::Reply, warp::Rejection> {
|
||||
// Checking reqiurements
|
||||
if !params.contains_key("api") || !params.contains_key("symbol") {
|
||||
let usage: String = format!("Usage: http(s)://path.to.neurostock/v1?api=[APIKEY]&symbol=[SYMBOL]\n");
|
||||
let usage: String = format!("Usage: http(s)://path.to.stockmapi/v1?api=[APIKEY]&symbol=[SYMBOL]\n");
|
||||
return Ok(warp::reply::with_status(usage, warp::http::StatusCode::BAD_REQUEST));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ impl Database {
|
|||
|
||||
pub fn connect(&mut self, address: String, user: String, pass: String) -> Result<(), Box<dyn Error>> {
|
||||
// Creating database connection url
|
||||
let url: String = format!("mysql://{}:{}@{}/neurostock", user, pass, address);
|
||||
let url: String = format!("mysql://{}:{}@{}/stockmapi", user, pass, address);
|
||||
|
||||
// Connecting via pool
|
||||
let pool: Pool = Pool::new(Opts::from_url(&url)?)?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue