parent
1e29145ff1
commit
4055d3843a
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,25 @@
|
|||||||
|
use actix_web::{body::BoxBody, Responder, HttpRequest, http::header::ContentType, HttpResponse};
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize)]
|
||||||
|
pub struct Page {
|
||||||
|
pub domain: String,
|
||||||
|
pub domain_name: String,
|
||||||
|
pub page: String,
|
||||||
|
pub page_name: String,
|
||||||
|
pub page_text: String,
|
||||||
|
pub parent_domain: String,
|
||||||
|
pub parent_page: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Responder for Page {
|
||||||
|
type Body = BoxBody;
|
||||||
|
|
||||||
|
fn respond_to(self, _req: &HttpRequest) -> HttpResponse<Self::Body> {
|
||||||
|
let res_body = serde_json::to_string(&self).unwrap();
|
||||||
|
|
||||||
|
HttpResponse::Ok()
|
||||||
|
.content_type(ContentType::json())
|
||||||
|
.body(res_body)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in new issue