diff --git a/cli/src/command/service.rs b/cli/src/command/service.rs index bf0b180..78aeb34 100644 --- a/cli/src/command/service.rs +++ b/cli/src/command/service.rs @@ -1,7 +1,7 @@ use crate::config::Config; +use chrono::{DateTime, Utc}; use clap::Command; use serde::{Deserialize, Serialize}; -use chrono::{DateTime, Utc}; pub fn sub_command() -> Command { Command::new("service") @@ -58,7 +58,7 @@ fn format_time_ago(from_datetime: DateTime) -> String { let now = Utc::now(); let duration = now.signed_duration_since(from_datetime); - return if duration.num_days() >= 1 { + if duration.num_days() >= 1 { format!("{}d", duration.num_days()) } else if duration.num_hours() >= 1 { format!("{}h", duration.num_hours()) @@ -74,5 +74,5 @@ fn format_time_ago(from_datetime: DateTime) -> String { #[derive(Debug, Serialize, Deserialize)] struct Service { name: String, - updated_at: DateTime + updated_at: DateTime, } diff --git a/cli/src/main.rs b/cli/src/main.rs index d5e02d7..aae311e 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -14,12 +14,12 @@ use crate::command::login::login; use crate::command::logout::logout; use crate::command::new::new; use crate::command::run::run; +use crate::command::service::list_services; use crate::command::session::session; use crate::command::token::list_token; use crate::command::{certificate, deploy, env, new, run, service, token}; use crate::config::{Config, VERSION}; use clap::Command; -use crate::command::service::list_services; fn cli() -> Command { Command::new("dosei") diff --git a/doseid/src/server/project/route.rs b/doseid/src/server/project/route.rs index 19d429c..9cee60c 100644 --- a/doseid/src/server/project/route.rs +++ b/doseid/src/server/project/route.rs @@ -1,9 +1,9 @@ use crate::config::Config; use crate::server::deployment::schema::Deployment; +use crate::server::deployment::schema::DeploymentStatus; use crate::server::project::schema::Project; use crate::server::project::GitSource; use crate::server::session::validate_session; -use crate::server::deployment::schema::DeploymentStatus; use axum::extract::Path; use axum::http::StatusCode; use axum::{Extension, Json};