ngoduykhanh / ifconfig.top

Source code of ifconfig.top website
MIT License
36 stars 14 forks source link

Enhance readability #1

Closed x8091 closed 5 years ago

x8091 commented 5 years ago

Please help to add newline character "\n" in response.

diff --git a/src/main.rs b/src/main.rs
index ca1310b..b20c634 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -94,7 +94,7 @@ fn index(req: HttpRequest<AppState>,
     // If user browses the index page by using command line,
     // return the public ip address instead of whole html page.
     if is_cli(&req) {
-        return Ok(HttpResponse::Ok().content_type("text/html").body(ip_address))
+        return Ok(HttpResponse::Ok().content_type("text/html").body(ip_address + "\n"))
     }

     let default_cmd = String::from("curl");
ngoduykhanh commented 5 years ago

Changed in 71979054b6e9431f45a020d0a95803077601fcb9. Thanks buddy.