Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { InputText } from 'primeng/inputtext';
import { Router, RouterLink } from '@angular/router';
import { FloatLabel } from 'primeng/floatlabel';
import { TimelessApiService } from '../../../timeless-api.service';
import { catchError } from 'rxjs';
import { catchError, EMPTY } from 'rxjs';
import { ToastService } from '../../../services/toast.service';

@Component({
Expand Down Expand Up @@ -53,10 +53,10 @@ export class SignUpComponent {
.signUp(this.form.value)
.pipe(
catchError((err: any) => {
if (err.error.message) {
if (err.error?.message) {
this.toast.error('Conflito', err.error.message);
}
return err;
return EMPTY;
}),
)
.subscribe((_) => {
Expand Down
2 changes: 2 additions & 0 deletions timeless-api/src/main/webui/src/app/token.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { timelessLocalStorageKey } from './constants';
const allowedPaths = [
'/api/sign-in',
'/api/sign-out',
'/api/sign-up',
'api/sign-in',
'api/sign-out',
'api/sign-up',
];

export const tokenInterceptor: HttpInterceptorFn = (req, next) => {
Expand Down