mirror of
https://github.com/google/nomulus.git
synced 2025-08-28 20:13:46 +02:00
Add registrar selection functionality (#2054)
This commit is contained in:
parent
952a92a5db
commit
86b62ebe76
21 changed files with 350 additions and 65 deletions
|
@ -41,35 +41,11 @@ export class BackendService {
|
|||
}
|
||||
|
||||
getContacts(registrarId: string): Observable<Contact[]> {
|
||||
const mockData = [
|
||||
{
|
||||
name: 'Name Lastname',
|
||||
emailAddress: 'test@google.com',
|
||||
registrarId: 'zoomco',
|
||||
types: ['ADMIN'],
|
||||
visibleInWhoisAsAdmin: false,
|
||||
visibleInWhoisAsTech: false,
|
||||
visibleInDomainWhoisAsAbuse: false,
|
||||
},
|
||||
{
|
||||
name: 'Testname testlastname',
|
||||
emailAddress: 'testasd@google.com',
|
||||
registrarId: 'zoomco',
|
||||
visibleInWhoisAsAdmin: false,
|
||||
visibleInWhoisAsTech: false,
|
||||
visibleInDomainWhoisAsAbuse: false,
|
||||
types: ['BILLING'],
|
||||
},
|
||||
];
|
||||
return this.http
|
||||
.get<Contact[]>(
|
||||
`/console-api/settings/contacts?registrarId=${registrarId}`
|
||||
)
|
||||
.pipe(
|
||||
catchError((err) =>
|
||||
this.errorCatcher<Contact[]>(err, <Contact[]>mockData)
|
||||
)
|
||||
);
|
||||
.pipe(catchError((err) => this.errorCatcher<Contact[]>(err)));
|
||||
}
|
||||
|
||||
postContacts(
|
||||
|
@ -81,4 +57,10 @@ export class BackendService {
|
|||
{ contacts }
|
||||
);
|
||||
}
|
||||
|
||||
getRegistrars(): Observable<string[]> {
|
||||
return this.http
|
||||
.get<string[]>('/console-api/registrars')
|
||||
.pipe(catchError((err) => this.errorCatcher<string[]>(err)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue