mirror of
https://github.com/google/nomulus
synced 2026-08-20 06:06:11 +00:00
Add console /registrars GET endpoint (#2050)
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user