mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-04 14:57:27 +00:00

* chore: env config * chore: get user workspace * feat: enable postgres storage * chore: add new env * chore: add set env ffi * chore: pass env before backend init * chore: update * fix: ci tests * chore: commit the generate env file * chore: remove unused import
22 lines
655 B
Rust
22 lines
655 B
Rust
use flowy_error::FlowyError;
|
|
use flowy_folder2::deps::{FolderCloudService, Workspace};
|
|
use flowy_folder2::gen_workspace_id;
|
|
use lib_infra::future::FutureResult;
|
|
use lib_infra::util::timestamp;
|
|
|
|
pub(crate) struct LocalServerFolderCloudServiceImpl();
|
|
|
|
impl FolderCloudService for LocalServerFolderCloudServiceImpl {
|
|
fn create_workspace(&self, _uid: i64, name: &str) -> FutureResult<Workspace, FlowyError> {
|
|
let name = name.to_string();
|
|
FutureResult::new(async move {
|
|
Ok(Workspace {
|
|
id: gen_workspace_id(),
|
|
name: name.to_string(),
|
|
belongings: Default::default(),
|
|
created_at: timestamp(),
|
|
})
|
|
})
|
|
}
|
|
}
|