Browse Source

Running cargo fmt

Nutomic-nodeinfo
Dessalines 2 years ago
parent
commit
dcad96170e
  1. 4
      server/src/lib.rs
  2. 5
      server/src/main.rs
  3. 2
      server/src/nodeinfo.rs

4
server/src/lib.rs

@ -25,10 +25,10 @@ pub extern crate strum;
pub mod api;
pub mod apub;
pub mod db;
pub mod schema;
pub mod websocket;
pub mod nodeinfo;
pub mod schema;
pub mod version;
pub mod websocket;
use chrono::{DateTime, NaiveDateTime, Utc};
use dotenv::dotenv;

5
server/src/main.rs

@ -200,7 +200,10 @@ fn main() {
// static resources
.service(actix_files::Files::new("/static", front_end_dir()))
.route("/nodeinfo/2.0.json", web::get().to(nodeinfo::node_info))
.route("/.well-known/nodeinfo", web::get().to(nodeinfo::node_info_well_known))
.route(
"/.well-known/nodeinfo",
web::get().to(nodeinfo::node_info_well_known),
)
})
.bind("0.0.0.0:8536")
.unwrap()

2
server/src/nodeinfo.rs

@ -2,8 +2,8 @@ use crate::db::community_view::SiteView;
use crate::db::establish_connection;
use crate::version;
use crate::Settings;
use actix_web::HttpResponse;
use actix_web::body::Body;
use actix_web::HttpResponse;
use serde_json::json;
pub fn node_info_well_known() -> HttpResponse<Body> {

Loading…
Cancel
Save