Skip to content

Commit

Permalink
feat: enable aliases by default on creation even if is_enabled not pa…
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Feb 21, 2023
1 parent 2c604c2 commit 6f5c12d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/web/my-account/validate-alias.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function validateAlias(ctx, next) {
);
}

body.is_enabled = boolean(body.is_enabled);
body.is_enabled = isSANB(body.is_enabled) ? boolean(body.is_enabled) : true;

if (isSANB(body.recipients))
body.recipients = _.compact(
Expand Down
2 changes: 1 addition & 1 deletion app/views/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ curl -X GET BASE_URI/v1/domains/DOMAIN_NAME/aliases \
| `description` | No | String | Alias description |
| `labels` | No | String or Array | List of labels (must be line-break/space/comma separated String or Array) |
| `has_recipient_verification` | No | Boolean | Whether to enable to require recipients to click an email verification link for emails to flow through (defaults to the domain's setting if not explicitly set in the request body) |
| `is_enabled` | No | Boolean | Whether to enable to disable this alias (if disabled, emails will be routed nowhere but return successful status codes) |
| `is_enabled` | No | Boolean | Whether to enable to disable this alias (if disabled, emails will be routed nowhere but return successful status codes). Defaults to `true`, but if a value is passed, it is converted to a boolean using [boolean](https://github.com/thenativeweb/boolean#quick-start)) |

> Example Request:
Expand Down

0 comments on commit 6f5c12d

Please sign in to comment.