mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-24 07:39:21 +00:00
feat(frontend): Add S3 backup UI and complete backup functionality
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
This commit is contained in:
committed by
Elisiário Couto
parent
7f2a4634c5
commit
0122913052
@@ -150,6 +150,8 @@ async def test_backup_connection(test_request: BackupTest) -> APIResponse:
|
||||
message="S3 connection test failed",
|
||||
)
|
||||
|
||||
except HTTPException:
|
||||
raise
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to test backup connection: {e}")
|
||||
raise HTTPException(
|
||||
@@ -200,8 +202,14 @@ async def backup_operation(operation_request: BackupOperation) -> APIResponse:
|
||||
status_code=400, detail="S3 backup is not configured"
|
||||
)
|
||||
|
||||
# Convert config to model
|
||||
s3_config = S3BackupConfig(**backup_config)
|
||||
# Convert config to model with validation
|
||||
try:
|
||||
s3_config = S3BackupConfig(**backup_config)
|
||||
except Exception as e:
|
||||
raise HTTPException(
|
||||
status_code=400, detail=f"Invalid S3 configuration: {str(e)}"
|
||||
) from e
|
||||
|
||||
backup_service = BackupService(s3_config)
|
||||
|
||||
if operation_request.operation == "backup":
|
||||
|
||||
Reference in New Issue
Block a user