[PM-3442] Change AnonAddy to addy.io (#6027)
* Update anon-addy-forwarder.ts * Update generator.component.ts
This commit is contained in:
parent
a81c70360a
commit
30e8a906ab
|
@ -244,7 +244,7 @@ export class GeneratorComponent implements OnInit {
|
|||
|
||||
private async initForwardOptions() {
|
||||
this.forwardOptions = [
|
||||
{ name: "AnonAddy", value: "anonaddy", validForSelfHosted: true },
|
||||
{ name: "addy.io", value: "anonaddy", validForSelfHosted: true },
|
||||
{ name: "DuckDuckGo", value: "duckduckgo", validForSelfHosted: false },
|
||||
{ name: "Fastmail", value: "fastmail", validForSelfHosted: true },
|
||||
{ name: "Firefox Relay", value: "firefoxrelay", validForSelfHosted: false },
|
||||
|
|
|
@ -6,10 +6,10 @@ import { ForwarderOptions } from "./forwarder-options";
|
|||
export class AnonAddyForwarder implements Forwarder {
|
||||
async generate(apiService: ApiService, options: ForwarderOptions): Promise<string> {
|
||||
if (options.apiKey == null || options.apiKey === "") {
|
||||
throw "Invalid AnonAddy API token.";
|
||||
throw "Invalid addy.io API token.";
|
||||
}
|
||||
if (options.anonaddy?.domain == null || options.anonaddy.domain === "") {
|
||||
throw "Invalid AnonAddy domain.";
|
||||
throw "Invalid addy.io domain.";
|
||||
}
|
||||
const requestInit: RequestInit = {
|
||||
redirect: "manual",
|
||||
|
@ -21,7 +21,7 @@ export class AnonAddyForwarder implements Forwarder {
|
|||
"X-Requested-With": "XMLHttpRequest",
|
||||
}),
|
||||
};
|
||||
const url = "https://app.anonaddy.com/api/v1/aliases";
|
||||
const url = "https://app.addy.io/api/v1/aliases";
|
||||
requestInit.body = JSON.stringify({
|
||||
domain: options.anonaddy.domain,
|
||||
description:
|
||||
|
@ -35,8 +35,8 @@ export class AnonAddyForwarder implements Forwarder {
|
|||
return json?.data?.email;
|
||||
}
|
||||
if (response.status === 401) {
|
||||
throw "Invalid AnonAddy API token.";
|
||||
throw "Invalid addy.io API token.";
|
||||
}
|
||||
throw "Unknown AnonAddy error occurred.";
|
||||
throw "Unknown addy.io error occurred.";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue