change mailboxes to mailbox_ids

This commit is contained in:
Son NK 2020-06-02 20:06:32 +02:00
parent d055989239
commit 48dc0dd1cc
3 changed files with 4 additions and 4 deletions

View file

@ -833,7 +833,7 @@ Input:
- Request Message Body in json (`Content-Type` is `application/json`) - Request Message Body in json (`Content-Type` is `application/json`)
- alias_prefix: string. The first part of the alias that user can choose. - 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. - 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 - (Optional) note: alias note
Output: Output:

View file

@ -201,7 +201,7 @@ def new_custom_alias_v3():
Input: Input:
alias_prefix, for ex "www_groupon_com" alias_prefix, for ex "www_groupon_com"
signed_suffix, either .random_letters@simplelogin.co or @my-domain.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 "hostname" in args
optional "note" optional "note"
@ -229,7 +229,7 @@ def new_custom_alias_v3():
alias_prefix = data.get("alias_prefix", "").strip().lower() alias_prefix = data.get("alias_prefix", "").strip().lower()
signed_suffix = data.get("signed_suffix", "").strip() signed_suffix = data.get("signed_suffix", "").strip()
mailbox_ids = data.get("mailboxes") mailbox_ids = data.get("mailbox_ids")
note = data.get("note") note = data.get("note")
alias_prefix = convert_to_id(alias_prefix) alias_prefix = convert_to_id(alias_prefix)

View file

@ -210,7 +210,7 @@ def test_success_v3(flask_client):
"alias_prefix": "prefix", "alias_prefix": "prefix",
"signed_suffix": suffix, "signed_suffix": suffix,
"note": "test note", "note": "test note",
"mailboxes": [user.default_mailbox_id, mb.id], "mailbox_ids": [user.default_mailbox_id, mb.id],
}, },
) )