mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: adding suffix for user data folder when current cloud type is appflowy cloud (#3918)
* 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
This commit is contained in:
@ -12,7 +12,7 @@ pub struct AppFlowyEnv {
|
||||
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 parser(env_str: &str) {
|
||||
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();
|
||||
|
@ -163,5 +163,5 @@ pub extern "C" fn backend_log(level: i64, data: *const c_char) {
|
||||
pub extern "C" fn set_env(data: *const c_char) {
|
||||
let c_str = unsafe { CStr::from_ptr(data) };
|
||||
let serde_str = c_str.to_str().unwrap();
|
||||
AppFlowyEnv::parser(serde_str);
|
||||
AppFlowyEnv::write_env_from(serde_str);
|
||||
}
|
||||
|
Reference in New Issue
Block a user