Skip to content
Snippets Groups Projects
Commit a1d21cd6 authored by Michael W Spalti's avatar Michael W Spalti
Browse files

Minor change to comment.

parent 5ec9b7c2
No related branches found
No related tags found
No related merge requests found
...@@ -53,8 +53,7 @@ export class DsoDataRedirectService extends DataService<any> { ...@@ -53,8 +53,7 @@ export class DsoDataRedirectService extends DataService<any> {
tap((response) => { tap((response) => {
if (response.hasSucceeded) { if (response.hasSucceeded) {
const uuid = response.payload.uuid; const uuid = response.payload.uuid;
// Is there an existing method somewhere that converts dso type to endpoint? // Is there an existing method somewhere that converts dso type route?
// This will not work for all endpoints!
const dsoType = this.getEndpointFromDSOType(response.payload.type); const dsoType = this.getEndpointFromDSOType(response.payload.type);
if (hasValue(uuid) && hasValue(dsoType)) { if (hasValue(uuid) && hasValue(dsoType)) {
this.router.navigate([dsoType + '/' + uuid]); this.router.navigate([dsoType + '/' + uuid]);
...@@ -65,6 +64,7 @@ export class DsoDataRedirectService extends DataService<any> { ...@@ -65,6 +64,7 @@ export class DsoDataRedirectService extends DataService<any> {
} }
getEndpointFromDSOType(dsoType: string): string { getEndpointFromDSOType(dsoType: string): string {
// Are there other routes to consider?
if (dsoType.startsWith('item')) { if (dsoType.startsWith('item')) {
return 'items' return 'items'
} else if (dsoType.startsWith('community')) { } else if (dsoType.startsWith('community')) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment