Browse Source

Removed unused config reference

* Removed unused imports
develop
Drew Short 6 years ago
parent
commit
66dacfa710
  1. 3
      src/args/mod.rs
  2. 2
      src/server/api.rs

3
src/args/mod.rs

@ -1,8 +1,5 @@
use clap::{App, Arg}; use clap::{App, Arg};
use crate::DEFAULT_HOST;
use crate::DEFAULT_PORT_STR;
use crate::DEFAULT_WORKERS_STR;
use crate::VERSION; use crate::VERSION;
pub mod parse; pub mod parse;

2
src/server/api.rs

@ -120,7 +120,6 @@ fn find_dns_record(
fn get_address(req: &HttpRequest<AppState>) -> HttpResponse { fn get_address(req: &HttpRequest<AppState>) -> HttpResponse {
let root_match = util::get_match_value(req, "root"); let root_match = util::get_match_value(req, "root");
let zone_match = util::get_match_value(req, "zone"); let zone_match = util::get_match_value(req, "zone");
let config: &Config = &req.state().config;
let cloudflare: &Cloudflare = &req.state().cloudflare; let cloudflare: &Cloudflare = &req.state().cloudflare;
if root_match.is_none() || zone_match.is_none() { if root_match.is_none() || zone_match.is_none() {
HttpResponse::BadRequest().into() HttpResponse::BadRequest().into()
@ -157,7 +156,6 @@ fn get_address(req: &HttpRequest<AppState>) -> HttpResponse {
fn update_address_automatically(req: &HttpRequest<AppState>) -> HttpResponse { fn update_address_automatically(req: &HttpRequest<AppState>) -> HttpResponse {
let root_match = util::get_match_value(req, "root"); let root_match = util::get_match_value(req, "root");
let zone_match = util::get_match_value(req, "zone"); let zone_match = util::get_match_value(req, "zone");
let config: &Config = &req.state().config;
let cloudflare: &Cloudflare = &req.state().cloudflare; let cloudflare: &Cloudflare = &req.state().cloudflare;
if root_match.is_none() || zone_match.is_none() { if root_match.is_none() || zone_match.is_none() {
HttpResponse::BadRequest().into() HttpResponse::BadRequest().into()

Loading…
Cancel
Save