mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Refactor backup mutation selection logic in ShowBackups component. Simplify key determination for mutation mapping based on backup type.
This commit is contained in:
@@ -74,8 +74,7 @@ export const ShowBackups = ({
|
|||||||
compose: api.backup.manualBackupCompose.useMutation(),
|
compose: api.backup.manualBackupCompose.useMutation(),
|
||||||
};
|
};
|
||||||
|
|
||||||
const key2 = backupType === "database" ? databaseType : "compose";
|
const mutation = mutationMap[key as keyof typeof mutationMap];
|
||||||
const mutation = mutationMap[key2 as keyof typeof mutationMap];
|
|
||||||
|
|
||||||
const { mutateAsync: manualBackup, isLoading: isManualBackup } = mutation
|
const { mutateAsync: manualBackup, isLoading: isManualBackup } = mutation
|
||||||
? mutation
|
? mutation
|
||||||
|
|||||||
Reference in New Issue
Block a user