mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-09-08 00:47:22 +08:00
chore: 格式化后端代码
This commit is contained in:
@@ -26,9 +26,9 @@ async fn migrate_database() -> Result<()> {
|
|||||||
|
|
||||||
/// 进行数据库迁移并获取数据库连接,供外部使用
|
/// 进行数据库迁移并获取数据库连接,供外部使用
|
||||||
pub async fn setup_database() -> Result<DatabaseConnection> {
|
pub async fn setup_database() -> Result<DatabaseConnection> {
|
||||||
tokio::fs::create_dir_all(CONFIG_DIR.as_path())
|
tokio::fs::create_dir_all(CONFIG_DIR.as_path()).await.context(
|
||||||
.await
|
"Failed to create config directory. Please check if you have granted necessary permissions to your folder.",
|
||||||
.context("Failed to create config directory. Please check if you have granted necessary permissions to your folder.")?;
|
)?;
|
||||||
migrate_database().await.context("Failed to migrate database")?;
|
migrate_database().await.context("Failed to migrate database")?;
|
||||||
database_connection().await.context("Failed to connect to database")
|
database_connection().await.context("Failed to connect to database")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user