style: cargo fmt
This commit is contained in:
parent
96250864af
commit
bebad3be9b
5 changed files with 14 additions and 15 deletions
|
@ -1,8 +1,7 @@
|
|||
use actix_web::{web, Scope};
|
||||
use actix_web::{Scope, web};
|
||||
|
||||
mod stats;
|
||||
|
||||
pub fn web() -> Scope {
|
||||
web::scope("/v1")
|
||||
.service(stats::res)
|
||||
web::scope("/v1").service(stats::res)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::time::SystemTime;
|
||||
|
||||
use actix_web::{get, web, HttpResponse, Responder};
|
||||
use actix_web::{HttpResponse, Responder, get, web};
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::Data;
|
||||
|
@ -19,7 +19,10 @@ struct Response {
|
|||
pub async fn res(data: web::Data<Data>) -> impl Responder {
|
||||
let response = Response {
|
||||
accounts: 0,
|
||||
uptime: SystemTime::now().duration_since(data.start_time).expect("Seriously why dont you have time??").as_secs(),
|
||||
uptime: SystemTime::now()
|
||||
.duration_since(data.start_time)
|
||||
.expect("Seriously why dont you have time??")
|
||||
.as_secs(),
|
||||
version: String::from(VERSION.unwrap_or("UNKNOWN")),
|
||||
build_number: String::from("how do i implement this?"),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue