Refactoring

This commit is contained in:
shamoon
2024-10-19 20:00:28 -07:00
parent 97889282b6
commit 52ca8025d4
3 changed files with 17 additions and 16 deletions

View File

@@ -51,7 +51,7 @@ export class ProfileService {
getTotpSettings(): Observable<TotpSettings> {
return this.http.get<TotpSettings>(
`${environment.apiBaseUrl}${this.endpoint}/totp_activate/`
`${environment.apiBaseUrl}${this.endpoint}/totp/`
)
}
@@ -60,7 +60,7 @@ export class ProfileService {
totpCode: string
): Observable<{ success: boolean; recovery_codes: string[] }> {
return this.http.post<{ success: boolean; recovery_codes: string[] }>(
`${environment.apiBaseUrl}${this.endpoint}/totp_activate/`,
`${environment.apiBaseUrl}${this.endpoint}/totp/`,
{
secret: totpSecret,
code: totpCode,
@@ -70,7 +70,7 @@ export class ProfileService {
deactivateTotp(): Observable<boolean> {
return this.http.delete<boolean>(
`${environment.apiBaseUrl}${this.endpoint}/totp_activate/`,
`${environment.apiBaseUrl}${this.endpoint}/totp/`,
{}
)
}