@@ -18,11 +18,11 @@ export class UserAuthService extends FunixprodHttpClient {
1818
1919 constructor ( protected httpClient : HttpClient , production : boolean ) {
2020 super ( ) ;
21- this . url = ( production ? environment . funixproductionsApiUrl : environmentDev . funixproductionsApiUrl ) + 'user/auth/ ' ;
21+ this . url = ( production ? environment . funixproductionsApiUrl : environmentDev . funixproductionsApiUrl ) + 'user/auth' ;
2222 }
2323
2424 register ( request : UserCreationDTO , captchaCode : string ) : Observable < UserDTO > {
25- return this . httpClient . post < UserDTO > ( this . url + 'register' , request , { headers : super . getHeaders ( captchaCode ) } )
25+ return this . httpClient . post < UserDTO > ( this . url + '/ register' , request , { headers : super . getHeaders ( captchaCode ) } )
2626 . pipe (
2727 catchError ( ( error : HttpErrorResponse ) => {
2828 return throwError ( ( ) => this . buildErrorDto ( error ) ) ;
@@ -31,7 +31,7 @@ export class UserAuthService extends FunixprodHttpClient {
3131 }
3232
3333 login ( request : UserLoginDTO , captchaCode : string ) : Observable < UserTokenDTO > {
34- return this . httpClient . post < UserTokenDTO > ( this . url + 'login' , request , { headers : super . getHeaders ( captchaCode ) } )
34+ return this . httpClient . post < UserTokenDTO > ( this . url + '/ login' , request , { headers : super . getHeaders ( captchaCode ) } )
3535 . pipe (
3636 catchError ( ( error : HttpErrorResponse ) => {
3737 return throwError ( ( ) => this . buildErrorDto ( error ) ) ;
@@ -40,7 +40,7 @@ export class UserAuthService extends FunixprodHttpClient {
4040 }
4141
4242 logout ( ) : Observable < void > {
43- return this . httpClient . post < void > ( this . url + 'logout' , null , { headers : super . getHeaders ( ) } )
43+ return this . httpClient . post < void > ( this . url + '/ logout' , null , { headers : super . getHeaders ( ) } )
4444 . pipe (
4545 catchError ( ( error : HttpErrorResponse ) => {
4646 return throwError ( ( ) => this . buildErrorDto ( error ) ) ;
@@ -49,7 +49,7 @@ export class UserAuthService extends FunixprodHttpClient {
4949 }
5050
5151 currentUser ( ) : Observable < UserDTO > {
52- return this . httpClient . get < UserDTO > ( this . url + 'current' , { headers : super . getHeaders ( ) } )
52+ return this . httpClient . get < UserDTO > ( this . url + '/ current' , { headers : super . getHeaders ( ) } )
5353 . pipe (
5454 catchError ( ( error : HttpErrorResponse ) => {
5555 return throwError ( ( ) => this . buildErrorDto ( error ) ) ;
@@ -59,7 +59,7 @@ export class UserAuthService extends FunixprodHttpClient {
5959
6060 getSessions ( page : string = '0' , elemsPerPage : string = '30' ) : Observable < Paginated < UserTokenDTO > > {
6161 const params : HttpParams = new HttpParams ( ) . set ( 'page' , page ) . set ( 'elementsPerPage' , elemsPerPage ) ;
62- return this . httpClient . get < Paginated < UserTokenDTO > > ( this . url + 'sessions' , { headers : super . getHeaders ( ) , params : params } )
62+ return this . httpClient . get < Paginated < UserTokenDTO > > ( this . url + '/ sessions' , { headers : super . getHeaders ( ) , params : params } )
6363 . pipe (
6464 catchError ( ( error : HttpErrorResponse ) => {
6565 return throwError ( ( ) => this . buildErrorDto ( error ) ) ;
@@ -75,7 +75,7 @@ export class UserAuthService extends FunixprodHttpClient {
7575 params = new HttpParams ( ) . set ( 'id' , ids as string ) ;
7676 }
7777
78- return this . httpClient . delete < void > ( this . url + 'sessions' , { headers : super . getHeaders ( ) , params : params } )
78+ return this . httpClient . delete < void > ( this . url + '/ sessions' , { headers : super . getHeaders ( ) , params : params } )
7979 . pipe (
8080 catchError ( ( error : HttpErrorResponse ) => {
8181 return throwError ( ( ) => this . buildErrorDto ( error ) ) ;
@@ -84,7 +84,7 @@ export class UserAuthService extends FunixprodHttpClient {
8484 }
8585
8686 resetPasswordRequest ( request : UserPasswordResetRequestDTO , captchaCode : string ) : Observable < void > {
87- return this . httpClient . post < void > ( this . url + 'resetPasswordRequest' , request , { headers : super . getHeaders ( captchaCode ) } )
87+ return this . httpClient . post < void > ( this . url + '/ resetPasswordRequest' , request , { headers : super . getHeaders ( captchaCode ) } )
8888 . pipe (
8989 catchError ( ( error : HttpErrorResponse ) => {
9090 return throwError ( ( ) => this . buildErrorDto ( error ) ) ;
@@ -93,7 +93,7 @@ export class UserAuthService extends FunixprodHttpClient {
9393 }
9494
9595 resetPassword ( request : UserPasswordResetDTO , captchaCode : string ) : Observable < void > {
96- return this . httpClient . post < void > ( this . url + 'resetPassword' , request , { headers : super . getHeaders ( captchaCode ) } )
96+ return this . httpClient . post < void > ( this . url + '/ resetPassword' , request , { headers : super . getHeaders ( captchaCode ) } )
9797 . pipe (
9898 catchError ( ( error : HttpErrorResponse ) => {
9999 return throwError ( ( ) => this . buildErrorDto ( error ) ) ;
@@ -102,7 +102,7 @@ export class UserAuthService extends FunixprodHttpClient {
102102 }
103103
104104 requestValidationCode ( ) : Observable < void > {
105- return this . httpClient . post < void > ( this . url + 'valid-account' , null , { headers : super . getHeaders ( ) } )
105+ return this . httpClient . post < void > ( this . url + '/ valid-account' , null , { headers : super . getHeaders ( ) } )
106106 . pipe (
107107 catchError ( ( error : HttpErrorResponse ) => {
108108 return throwError ( ( ) => this . buildErrorDto ( error ) ) ;
0 commit comments