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

This commit is contained in:
holgerhagen 2024-03-05 11:15:59 +01:00 committed by GitHub
parent 1c948ba740
commit 1555f210c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 { asUrlQueryString } from '../../shared/util/query-parameters-v2';
import { TaskState } from '../../shared/models/task-state'; import { TaskState } from '../../shared/models/task-state';
const monitorUrl = '/v1/monitor/'; const monitorUrl = '/v1/monitor';
@Injectable() @Injectable()
export class MonitorService { export class MonitorService {
@ -18,7 +18,7 @@ export class MonitorService {
states: [TaskState.READY, TaskState.CLAIMED, TaskState.COMPLETED] states: [TaskState.READY, TaskState.CLAIMED, TaskState.COMPLETED]
}; };
return this.httpClient.get<ReportData>( 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] states: [TaskState.READY, TaskState.CLAIMED, TaskState.COMPLETED]
}; };
return this.httpClient.get<ReportData>( 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] states: [TaskState.READY, TaskState.CLAIMED, TaskState.COMPLETED]
}; };
return this.httpClient.get<ReportData>( return this.httpClient.get<ReportData>(
`${environment.taskanaRestUrl + monitorUrl}workbasket-report${asUrlQueryString(queryParams)}` `${environment.taskanaRestUrl + monitorUrl}/workbasket-report${asUrlQueryString(queryParams)}`
); );
} }
getClassificationTasksReport(): Observable<ReportData> { 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> { 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[] { getChartData(source: ReportData): ChartData[] {
@ -67,7 +67,7 @@ export class MonitorService {
}; };
return this.httpClient.get<ReportData>( 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) { removeAccessItemsPermissions(accessId: string) {
return this.httpClient.delete<WorkbasketAccessItemsRepresentation>( 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 { get url(): string {
return this.startupService.getTaskanaRestUrl() + '/v1/classifications/'; return this.startupService.getTaskanaRestUrl() + '/v1/classifications';
} }
// GET // GET
@ -39,7 +39,7 @@ export class ClassificationsService {
// GET // GET
getClassification(id: string): Observable<Classification> { getClassification(id: string): Observable<Classification> {
return this.httpClient.get<Classification>(`${this.url}${id}`); return this.httpClient.get<Classification>(`${this.url}/${id}`);
} }
// POST // POST
@ -49,11 +49,11 @@ export class ClassificationsService {
// PUT // PUT
putClassification(classification: Classification): Observable<Classification> { 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 // DELETE
deleteClassification(id: string): Observable<string> { 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) {} constructor(private httpClient: HttpClient, private startupService: StartupService) {}
get url(): string { get url(): string {
return this.startupService.getTaskanaRestUrl() + '/v1/routing-rules/default/'; return this.startupService.getTaskanaRestUrl() + '/v1/routing-rules/default';
} }
uploadRoutingRules(file: File) { uploadRoutingRules(file: File) {

View File

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