mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
* fix: load database fail caused by spawning long run task * chore: yield long run task * chore: fmt * chore: update client api * feat: copy data between server * ci: fix af cloud test
22 lines
682 B
Rust
22 lines
682 B
Rust
use serde::Deserialize;
|
|
|
|
use flowy_server_config::af_cloud_config::AFCloudConfiguration;
|
|
use flowy_server_config::supabase_config::SupabaseConfiguration;
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
pub struct AppFlowyEnv {
|
|
supabase_config: SupabaseConfiguration,
|
|
appflowy_cloud_config: AFCloudConfiguration,
|
|
}
|
|
|
|
impl AppFlowyEnv {
|
|
/// Parse the environment variable from the frontend application. The frontend will
|
|
/// pass the environment variable as a json string after launching.
|
|
pub fn write_env_from(env_str: &str) {
|
|
if let Ok(env) = serde_json::from_str::<AppFlowyEnv>(env_str) {
|
|
env.supabase_config.write_env();
|
|
env.appflowy_cloud_config.write_env();
|
|
}
|
|
}
|
|
}
|