From 729e285639a67c9418cd64bc5f7707bba6397c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CGiems=E2=80=9D?= <“hubert.wabia@gmail.com”> Date: Thu, 27 Jun 2024 11:33:22 +0200 Subject: [PATCH] fix --- server/src/http/cloud/register_new_app.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/src/http/cloud/register_new_app.rs b/server/src/http/cloud/register_new_app.rs index 2e209c79..99a7d182 100644 --- a/server/src/http/cloud/register_new_app.rs +++ b/server/src/http/cloud/register_new_app.rs @@ -3,8 +3,9 @@ use super::{ utils::{custom_validate_name, custom_validate_team_id, validate_request}, }; use crate::{ - middlewares::auth_middleware::UserId, statics::REGISTERED_APPS_LIMIT_PER_TEAM, - structs::cloud::api_cloud_errors::CloudApiErrors, test_env::is_test_env, + env::is_env_production, middlewares::auth_middleware::UserId, + statics::REGISTERED_APPS_LIMIT_PER_TEAM, structs::cloud::api_cloud_errors::CloudApiErrors, + test_env::is_test_env, }; use axum::{extract::State, http::StatusCode, Extension, Json}; use database::{ @@ -104,7 +105,7 @@ pub async fn register_new_app( // Grafana, add new app // TODO, fix this by fixing methods for setting up grafana datasource - if !is_test_env() { + if !is_test_env() || !is_env_production() { handle_grafana_create_new_app( &grafana_conf, &request.app_name,