Commit bf602fa8 authored by Pearu Sarv's avatar Pearu Sarv
Browse files

Merge branch 'hotfix/TEIS-1586' into 'master'

Release: merge 'hotfix-teis-1586' into 'master' created by Pearu Sarv

See merge request teis/public-web-client!724
parents 3e3bee84 684330fb
{
"name": "te-is",
"version": "1.31.2",
"version": "1.31.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "te-is",
"version": "1.31.2",
"version": "1.31.3",
"license": "MIT",
"scripts": {
"ng": "ng",
......
......@@ -5,6 +5,10 @@ import { AuthenticationService } from '../../authentication/authentication.servi
import { Observable, throwError } from 'rxjs';
import { catchError, tap } from 'rxjs/operators';
const isFileApiRequest = (url: string): boolean => {
return /\/api-common\/.+\/.+\/files/g.test(url);
};
@Injectable()
export class SubmittingInterceptorService implements HttpInterceptor {
private connections: string[] = [];
......@@ -15,7 +19,7 @@ export class SubmittingInterceptorService implements HttpInterceptor {
) {}
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
if ((request.method === 'POST' || request.method === 'PATCH' || request.method === 'PUT')) {
if ((request.method === 'POST' || request.method === 'PATCH' || request.method === 'PUT') && !isFileApiRequest(request.url)) {
if (!this.connections.find(url => request.url === url)) {
this.connections.push(request.url);
this.submitting.submit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment