Add console /registrars GET endpoint (#2050)

This commit is contained in:
Pavlo Tkach 2023-06-09 16:57:26 -04:00 committed by GitHub
parent a9aaa11801
commit bc57f319e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 204 additions and 10 deletions

View file

@ -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 }