neon_arch
commited on
Commit
•
9c71c9f
1
Parent(s):
e8998a4
🧹 chore: make rustfmt happy
Browse files- src/server/routes.rs +2 -1
src/server/routes.rs
CHANGED
@@ -215,7 +215,8 @@ async fn results(
|
|
215 |
/// Handles the route of robots.txt page of the `websurfx` meta search engine website.
|
216 |
#[get("/robots.txt")]
|
217 |
pub async fn robots_data(_req: HttpRequest) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
218 |
-
let page_content: String =
|
|
|
219 |
Ok(HttpResponse::Ok()
|
220 |
.content_type("text/plain; charset=ascii")
|
221 |
.body(page_content))
|
|
|
215 |
/// Handles the route of robots.txt page of the `websurfx` meta search engine website.
|
216 |
#[get("/robots.txt")]
|
217 |
pub async fn robots_data(_req: HttpRequest) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
218 |
+
let page_content: String =
|
219 |
+
read_to_string(format!("{}/robots.txt", file_path(FileType::Theme)?))?;
|
220 |
Ok(HttpResponse::Ok()
|
221 |
.content_type("text/plain; charset=ascii")
|
222 |
.body(page_content))
|