Chore: Upgrade to Angular v18

Chore: Upgrade to Python 3.12
Chore: Upgrade to psycopg3
This commit is contained in:
2024-06-03 13:22:56 +05:30
parent 56c1be5e05
commit 010e9a84db
573 changed files with 5727 additions and 6528 deletions

View File

@ -0,0 +1,17 @@
import { HttpInterceptorFn } from '@angular/common/http';
import { inject } from '@angular/core';
import { AuthService } from '../auth/auth.service';
export const refreshInterceptor: HttpInterceptorFn = (req, next) => {
const authService = inject(AuthService);
if (!authService.isRefreshing && authService.user && authService.needsRefreshing()) {
authService.isRefreshing = true;
authService.refreshToken().subscribe({
next: () => {
authService.isRefreshing = false;
},
});
}
return next(req);
};