* Fixed issue where put requests weren't firing with the optional body parameter

This also "fixes" the /neighbor/update route conveniently enough, which had much
better behavior than expected before.

- Remvoing some fluff from debugging
This commit is contained in:
shockrah
2021-05-12 13:02:42 -07:00
parent a0d60c0568
commit 8bff61ab71
3 changed files with 1 additions and 4 deletions

View File

@@ -7,7 +7,6 @@ use serde_json::json;
use std::collections::HashMap;
use crate::http::set_json_body;
use crate::perms;
use crate::qs_param;
use db::Message;

View File

@@ -101,8 +101,6 @@ pub async fn update_neighbor(p: &Pool, response: &mut Response<Body>, params: Ha
let s: String = String::from_utf8_lossy(&body).to_string();
let json: JsonResult<Neighbor> = serde_json::from_str(&s);
println!("\tjson result: {:?}", json);
println!("\tbody {}", s);
// Verify query string parameter **and** body before attempting to reach database
match (target, json) {
(Some(target_url), Ok(neighbor)) => {