mirror of
https://github.com/google/nomulus.git
synced 2025-08-02 07:52:11 +02:00
Add console /registrars GET endpoint (#2050)
This commit is contained in:
parent
2415097105
commit
270fe06c34
8 changed files with 204 additions and 10 deletions
|
@ -49,13 +49,11 @@ export class ContactService {
|
|||
contacts: Contact[],
|
||||
registrarId?: string
|
||||
): Observable<Contact[]> {
|
||||
return this.backend
|
||||
.postContacts(registrarId || 'default', contacts)
|
||||
.pipe(
|
||||
tap((_) => {
|
||||
this.contacts = contacts;
|
||||
})
|
||||
);
|
||||
return this.backend.postContacts(registrarId || 'default', contacts).pipe(
|
||||
tap((_) => {
|
||||
this.contacts = contacts;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
updateContact(index: number, contact: Contact) {
|
||||
|
|
|
@ -62,11 +62,20 @@ export class BackendService {
|
|||
},
|
||||
];
|
||||
return this.http
|
||||
.get<Contact[]>(`/console-api/settings/contacts?registrarId=${registrarId}`)
|
||||
.pipe(catchError((err) => this.errorCatcher<Contact[]>(err, <Contact[]>mockData)));
|
||||
.get<Contact[]>(
|
||||
`/console-api/settings/contacts?registrarId=${registrarId}`
|
||||
)
|
||||
.pipe(
|
||||
catchError((err) =>
|
||||
this.errorCatcher<Contact[]>(err, <Contact[]>mockData)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
postContacts(registrarId: string, contacts: Contact[]): Observable<Contact[]> {
|
||||
postContacts(
|
||||
registrarId: string,
|
||||
contacts: Contact[]
|
||||
): Observable<Contact[]> {
|
||||
return this.http.post<Contact[]>(
|
||||
`/console-api/settings/contacts?registrarId=${registrarId}`,
|
||||
{ contacts }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue