Skip to content

Commit

Permalink
fix: Fix project roles fetch path
Browse files Browse the repository at this point in the history
  • Loading branch information
leoliu committed Jun 9, 2020
1 parent df668d2 commit c405e12
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/stores/role.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,23 @@ export default class RoleStore extends Base {

getPath({ cluster, workspace, namespace, devops }) {
let path = ''

if (cluster) {
path += `/klusters/${cluster}`
}
if (workspace) {
path += `/workspaces/${workspace}`
}

if (namespace) {
path += `/namespaces/${namespace}`
return `${path}/namespaces/${namespace}`
}

if (devops) {
path += `/devops/${devops}`
return `${path}/devops/${devops}`
}

if (workspace) {
return `/workspaces/${workspace}`
}

return path
}

Expand Down

0 comments on commit c405e12

Please sign in to comment.