summaryrefslogtreecommitdiffhomepage
path: root/mullvad-management-interface/src/client.rs
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-06-17 16:55:21 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-06-24 14:22:23 +0200
commit14fcbe159ea35ebd4e4d0adebd182e47631335cb (patch)
treeacc327998e3fa82c06c61c064bf0b370b6adc18b /mullvad-management-interface/src/client.rs
parent41a021c7d4efdb74b1c71e7567d22ffc930411c4 (diff)
downloadmullvadvpn-14fcbe159ea35ebd4e4d0adebd182e47631335cb.tar.xz
mullvadvpn-14fcbe159ea35ebd4e4d0adebd182e47631335cb.zip
Enable support for creating a custom list with locations
Diffstat (limited to 'mullvad-management-interface/src/client.rs')
-rw-r--r--mullvad-management-interface/src/client.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/mullvad-management-interface/src/client.rs b/mullvad-management-interface/src/client.rs
index 73129d6b99..93a31a5042 100644
--- a/mullvad-management-interface/src/client.rs
+++ b/mullvad-management-interface/src/client.rs
@@ -571,18 +571,22 @@ impl MullvadProxyClient {
}
pub async fn create_custom_list(&mut self, name: String) -> Result<Id> {
+ let request = types::NewCustomList {
+ name,
+ locations: Vec::new(),
+ };
let id = self
.0
- .create_custom_list(name)
+ .create_custom_list(request)
.await
.map_err(map_custom_list_error)?
.into_inner();
Id::from_str(&id).map_err(|_| Error::CustomListListNotFound)
}
- pub async fn delete_custom_list(&mut self, id: String) -> Result<()> {
+ pub async fn delete_custom_list(&mut self, id: Id) -> Result<()> {
self.0
- .delete_custom_list(id)
+ .delete_custom_list(id.to_string())
.await
.map_err(map_custom_list_error)?;
Ok(())