Closes #2505 - removed some more trailing slashes (#2515)

This commit is contained in:
holgerhagen 2024-03-05 11:15:59 +01:00 committed by Maria Margaritis
parent 282a5ad498
commit 9f0a6eabde
5 changed files with 15 additions and 15 deletions

View File

@ -7,7 +7,7 @@ import { ReportData } from '../models/report-data';
import { asUrlQueryString } from '../../shared/util/query-parameters-v2';
import { TaskState } from '../../shared/models/task-state';
const monitorUrl = '/v1/monitor/';
const monitorUrl = '/v1/monitor';
@Injectable()
export class MonitorService {
@ -18,7 +18,7 @@ export class MonitorService {
states: [TaskState.READY, TaskState.CLAIMED, TaskState.COMPLETED]
};
return this.httpClient.get<ReportData>(
`${environment.taskanaRestUrl + monitorUrl}task-status-report${asUrlQueryString(queryParams)}`
`${environment.taskanaRestUrl + monitorUrl}/task-status-report${asUrlQueryString(queryParams)}`
);
}
@ -27,7 +27,7 @@ export class MonitorService {
states: [TaskState.READY, TaskState.CLAIMED, TaskState.COMPLETED]
};
return this.httpClient.get<ReportData>(
`${environment.taskanaRestUrl + monitorUrl}workbasket-report${asUrlQueryString(queryParams)}`
`${environment.taskanaRestUrl + monitorUrl}/workbasket-report${asUrlQueryString(queryParams)}`
);
}
@ -37,16 +37,16 @@ export class MonitorService {
states: [TaskState.READY, TaskState.CLAIMED, TaskState.COMPLETED]
};
return this.httpClient.get<ReportData>(
`${environment.taskanaRestUrl + monitorUrl}workbasket-report${asUrlQueryString(queryParams)}`
`${environment.taskanaRestUrl + monitorUrl}/workbasket-report${asUrlQueryString(queryParams)}`
);
}
getClassificationTasksReport(): Observable<ReportData> {
return this.httpClient.get<ReportData>(`${environment.taskanaRestUrl + monitorUrl}classification-report`);
return this.httpClient.get<ReportData>(`${environment.taskanaRestUrl + monitorUrl}/classification-report`);
}
getDailyEntryExitReport(): Observable<ReportData> {
return this.httpClient.get<ReportData>(`${environment.taskanaRestUrl + monitorUrl}timestamp-report`);
return this.httpClient.get<ReportData>(`${environment.taskanaRestUrl + monitorUrl}/timestamp-report`);
}
getChartData(source: ReportData): ChartData[] {
@ -67,7 +67,7 @@ export class MonitorService {
};
return this.httpClient.get<ReportData>(
`${environment.taskanaRestUrl + monitorUrl}workbasket-priority-report${asUrlQueryString(queryParams)}`
`${environment.taskanaRestUrl + monitorUrl}/workbasket-priority-report${asUrlQueryString(queryParams)}`
);
}
}

View File

@ -52,7 +52,7 @@ export class AccessIdsService {
removeAccessItemsPermissions(accessId: string) {
return this.httpClient.delete<WorkbasketAccessItemsRepresentation>(
`${environment.taskanaRestUrl}/v1/workbasket-access-items/?access-id=${accessId}`
`${environment.taskanaRestUrl}/v1/workbasket-access-items?access-id=${accessId}`
);
}
}

View File

@ -23,7 +23,7 @@ export class ClassificationsService {
) {}
get url(): string {
return this.startupService.getTaskanaRestUrl() + '/v1/classifications/';
return this.startupService.getTaskanaRestUrl() + '/v1/classifications';
}
// GET
@ -39,7 +39,7 @@ export class ClassificationsService {
// GET
getClassification(id: string): Observable<Classification> {
return this.httpClient.get<Classification>(`${this.url}${id}`);
return this.httpClient.get<Classification>(`${this.url}/${id}`);
}
// POST
@ -49,11 +49,11 @@ export class ClassificationsService {
// PUT
putClassification(classification: Classification): Observable<Classification> {
return this.httpClient.put<Classification>(`${this.url}${classification.classificationId}`, classification);
return this.httpClient.put<Classification>(`${this.url}/${classification.classificationId}`, classification);
}
// DELETE
deleteClassification(id: string): Observable<string> {
return this.httpClient.delete<string>(`${this.url}${id}`);
return this.httpClient.delete<string>(`${this.url}/${id}`);
}
}

View File

@ -9,7 +9,7 @@ export class RoutingUploadService {
constructor(private httpClient: HttpClient, private startupService: StartupService) {}
get url(): string {
return this.startupService.getTaskanaRestUrl() + '/v1/routing-rules/default/';
return this.startupService.getTaskanaRestUrl() + '/v1/routing-rules/default';
}
uploadRoutingRules(file: File) {

View File

@ -19,7 +19,7 @@ export class TaskProcessingComponent implements OnInit, OnDestroy {
routeSubscription: Subscription;
regex = /\${(.*?)}/g;
address = 'https://bing.com/';
address = 'https://bing.com';
link: SafeResourceUrl;
task: Task = null;
@ -59,7 +59,7 @@ export class TaskProcessingComponent implements OnInit, OnDestroy {
const classification = await this.classificationService
.getClassification(this.task.classificationSummary.classificationId)
.toPromise();
this.address = this.extractUrl(classification.applicationEntryPoint) || `${this.address}/?q=${this.task.name}`;
this.address = this.extractUrl(classification.applicationEntryPoint) || `${this.address}?q=${this.task.name}`;
this.link = this.sanitizer.bypassSecurityTrustResourceUrl(this.address);
this.getWorkbaskets();
this.requestInProgressService.setRequestInProgress(false);