Skip to content

Commit

Permalink
url rule change
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Aug 7, 2017
1 parent 23d0a1d commit 293f8e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ export function getUIURL(entityName, action, id) {
return joinURLPaths(options.uiRootURL, `${baseName}/${id}/delete`)
}else if (action === 'create'){
return joinURLPaths(options.uiRootURL, `${baseName}/create`)
}else if (action === 'edit'){
return joinURLPaths(options.uiRootURL, `${baseName}/${id}`)
}
if (id !== undefined) {
return joinURLPaths(options.uiRootURL, `${baseName}/${id}`)
return joinURLPaths(options.uiRootURL, `${baseName}/${id}/${action}`)
}
return joinURLPaths(options.uiRootURL, `${baseName}`)
return joinURLPaths(options.uiRootURL, `${baseName}/${action}`)
}
export function getAPIURL(entityName, action, id) {
const baseName = inflection.pluralize(entityName)
Expand Down

0 comments on commit 293f8e6

Please sign in to comment.