mirror of
https://github.com/google/nomulus.git
synced 2025-08-28 20:13:46 +02:00
Add Console Settings -> Security front-end (#2079)
This commit is contained in:
parent
9873772150
commit
9b17adcb28
19 changed files with 545 additions and 21 deletions
|
@ -16,6 +16,7 @@ import { Injectable } from '@angular/core';
|
|||
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
||||
import { Observable, catchError, of } from 'rxjs';
|
||||
import { Contact } from '../../settings/contact/contact.service';
|
||||
import { SecuritySettingsBackendModel } from 'src/app/settings/security/security.service';
|
||||
|
||||
@Injectable()
|
||||
export class BackendService {
|
||||
|
@ -63,4 +64,28 @@ export class BackendService {
|
|||
.get<string[]>('/console-api/registrars')
|
||||
.pipe(catchError((err) => this.errorCatcher<string[]>(err)));
|
||||
}
|
||||
|
||||
getSecuritySettings(
|
||||
registrarId: string
|
||||
): Observable<SecuritySettingsBackendModel> {
|
||||
return this.http
|
||||
.get<SecuritySettingsBackendModel>(
|
||||
`/console-api/settings/security?registrarId=${registrarId}`
|
||||
)
|
||||
.pipe(
|
||||
catchError((err) =>
|
||||
this.errorCatcher<SecuritySettingsBackendModel>(err)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
postSecuritySettings(
|
||||
registrarId: string,
|
||||
securitySettings: SecuritySettingsBackendModel
|
||||
): Observable<SecuritySettingsBackendModel> {
|
||||
return this.http.post<SecuritySettingsBackendModel>(
|
||||
`/console-api/settings/security?registrarId=${registrarId}`,
|
||||
{ registrar: securitySettings }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue