]> git.proxmox.com Git - proxmox-backup.git/commit - src/api2/config/remote.rs
remote: try to use Struct for api
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 22 May 2020 12:51:45 +0000 (14:51 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 26 May 2020 06:55:07 +0000 (08:55 +0200)
commit83fd4b3b1b228d190ac19f22c78e366efcf485b1
tree172091412040848b2ca0f1b79a50bd45c047a435
parentbfa0146c000139b6439fb004dca738a73d0a2ccc
remote: try to use Struct for api

with a catch: password is in the struct but we do not want it to return
via the api, so we only 'serialize' it when the string is not empty
(this can only happen when the format is not checked by us, iow.
when its returned from the api) and setting it manually to ""
when we return remotes from the api

this way we can still use the type but do not return the password

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/api2/config/remote.rs
src/config/remote.rs