|
@ -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()
|
|
|