mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-24 13:01:28 +00:00
feat(backup): allow no auth
This commit is contained in:
parent
696cb406a8
commit
5fd7b6c4ed
|
@ -15,8 +15,15 @@ class ResticBackuper(AbstractBackuper):
|
|||
def rclone_args(self):
|
||||
return "rclone.args=serve restic --stdio" + self.backend_rclone_args()
|
||||
|
||||
def backend_rclone_args(self, account: str, key: str):
|
||||
return f"{self.login_flag} {account} {self.key_flag} {key}"
|
||||
def backend_rclone_args(self, account: str, key: str) -> str:
|
||||
acc_arg = ""
|
||||
key_arg = ""
|
||||
if account != "":
|
||||
acc_arg = f"{self.login_flag} {account}"
|
||||
if key != "":
|
||||
key_arg = f"{self.key_flag} {key}"
|
||||
|
||||
return f"{acc_arg} {key_arg}"
|
||||
|
||||
def restic_command(self, account: str, key: str, *args):
|
||||
return [
|
||||
|
|
Loading…
Reference in a new issue