Skip to content

Commit 47b9320

Browse files
authored
Merge pull request #146 from netgrif/NAE-1762
[NAE-1762] Public view URL encoding
2 parents 7e7ac62 + 16e8510 commit 47b9320

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

projects/nae-example-app/src/app/doc/public-workflow-view/public-workflow-view.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ export class PublicWorkflowViewComponent extends AbstractWorkflowViewComponent {
6666
}
6767

6868
handleClick(workflow: Net) {
69-
this._router.navigate([this._route.snapshot.url.join('/') + '/' + workflow.identifier]);
69+
this._router.navigate([this._route.snapshot.url.join('/') + '/' + btoa(workflow.identifier)]);
7070
}
7171
}

projects/netgrif-components-core/src/lib/public/factories/get-net-and-create-case.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const getNetAndCreateCase = (router: Router,
1414
snackBarService: SnackBarService,
1515
translate: TranslateService,
1616
publicTaskLoadingService: PublicTaskLoadingService) => {
17-
process.getNet(route.snapshot.paramMap.get('petriNetId')).pipe(mergeMap(net => {
17+
process.getNet(atob(route.snapshot.paramMap.get('petriNetId'))).pipe(mergeMap(net => {
1818
if (net) {
1919
publicTaskLoadingService.setLoading$(true);
2020
const newCase = {

projects/netgrif-components-core/src/lib/resources/engine-endpoint/public/public-petri-net-resource.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class PublicPetriNetResourceService extends PetriNetResourceService {
4242
* **Request URL:** {{baseUrl}}/api/public/petrinet/{identifier}/{version}
4343
*/
4444
public getOne(identifier: string, version: string, params?: Params): Observable<PetriNetReference> {
45-
return this.provider.get$('public/petrinet/' + identifier + '/' + version, this.SERVER_URL, params)
45+
return this.provider.get$('public/petrinet/' + btoa(identifier) + '/' + version, this.SERVER_URL, params)
4646
.pipe(map(r => this.changeType(r, 'petriNetReferences')));
4747
}
4848

0 commit comments

Comments
 (0)