From 48dc0dd1ccea8029088a2bc1a52125a06c8e2180 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Tue, 2 Jun 2020 20:06:32 +0200 Subject: [PATCH] change mailboxes to mailbox_ids --- README.md | 2 +- app/api/views/new_custom_alias.py | 4 ++-- tests/api/test_new_custom_alias.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0ae02bdf..41d8cab3 100644 --- a/README.md +++ b/README.md @@ -833,7 +833,7 @@ Input: - Request Message Body in json (`Content-Type` is `application/json`) - alias_prefix: string. The first part of the alias that user can choose. - signed_suffix: should be one of the suffixes returned in the `GET /api/v4/alias/options` endpoint. - - mailboxes: list of mailbox_id that "owns" this alias + - mailbox_ids: list of mailbox_id that "owns" this alias - (Optional) note: alias note Output: diff --git a/app/api/views/new_custom_alias.py b/app/api/views/new_custom_alias.py index 353f95db..c79bc072 100644 --- a/app/api/views/new_custom_alias.py +++ b/app/api/views/new_custom_alias.py @@ -201,7 +201,7 @@ def new_custom_alias_v3(): Input: alias_prefix, for ex "www_groupon_com" signed_suffix, either .random_letters@simplelogin.co or @my-domain.com - mailboxes: list of int + mailbox_ids: list of int optional "hostname" in args optional "note" @@ -229,7 +229,7 @@ def new_custom_alias_v3(): alias_prefix = data.get("alias_prefix", "").strip().lower() signed_suffix = data.get("signed_suffix", "").strip() - mailbox_ids = data.get("mailboxes") + mailbox_ids = data.get("mailbox_ids") note = data.get("note") alias_prefix = convert_to_id(alias_prefix) diff --git a/tests/api/test_new_custom_alias.py b/tests/api/test_new_custom_alias.py index 29417ab8..e45622ea 100644 --- a/tests/api/test_new_custom_alias.py +++ b/tests/api/test_new_custom_alias.py @@ -210,7 +210,7 @@ def test_success_v3(flask_client): "alias_prefix": "prefix", "signed_suffix": suffix, "note": "test note", - "mailboxes": [user.default_mailbox_id, mb.id], + "mailbox_ids": [user.default_mailbox_id, mb.id], }, )