@@ -3,7 +3,13 @@ import { Injectable, computed, inject, signal } from '@angular/core';
33import { Observable , catchError , finalize , firstValueFrom , map , of , shareReplay , tap } from 'rxjs' ;
44import { environment } from '../../../environments/environment' ;
55import { ApiResponse } from '../models/api-response.model' ;
6- import { AuthUser , LoginResponse , MeResponse , RefreshResponse , SiteSummary } from '../models/auth.model' ;
6+ import {
7+ AuthUser ,
8+ LoginResponse ,
9+ MeResponse ,
10+ RefreshResponse ,
11+ SiteSummary ,
12+ } from '../models/auth.model' ;
713import { Router } from '@angular/router' ;
814
915const TOKEN_KEY = 'da_token' ;
@@ -65,11 +71,7 @@ export class AuthService {
6571 if ( this . refreshInFlight$ ) return this . refreshInFlight$ ;
6672
6773 this . refreshInFlight$ = this . http
68- . post < ApiResponse < RefreshResponse > > (
69- `${ this . baseUrl } /refresh` ,
70- { } ,
71- { withCredentials : true } ,
72- )
74+ . post < ApiResponse < RefreshResponse > > ( `${ this . baseUrl } /refresh` , { } , { withCredentials : true } )
7375 . pipe (
7476 map ( ( res ) => {
7577 if ( res . data ) {
@@ -112,7 +114,7 @@ export class AuthService {
112114 logout ( ) : void {
113115 this . http
114116 . post ( `${ this . baseUrl } /logout` , { } , { withCredentials : true } )
115- . subscribe ( { error : ( ) => { } } ) ;
117+ . subscribe ( { error : ( ) => { } } ) ;
116118 this . clearSession ( ) ;
117119 }
118120
0 commit comments