Skip to content

Commit

Permalink
Rename project api actions to contain api
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Feb 14, 2011
1 parent 6531dc7 commit 69aefa4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rundeckapp/grails-app/conf/UrlMappings.groovy
Expand Up @@ -24,8 +24,8 @@ class UrlMappings {
"/api/run/command" (controller: 'scheduledExecution', action: 'apiRunCommand')
"/api/run/script" (controller: 'scheduledExecution', action: 'apiRunScript')

"/api/projects" (controller: 'framework', action: 'listProjects')
"/api/project/$project?" (controller: 'framework', action: 'getProject')
"/api/projects" (controller: 'framework', action: 'apiProjects')
"/api/project/$project?" (controller: 'framework', action: 'apiProject')
"/api/history" (controller: 'reports', action: 'apiHistory')
"/api/renderError" (controller: 'api', action: 'renderError')
"/api/error" (controller: 'api', action: 'error')
Expand Down
10 changes: 8 additions & 2 deletions rundeckapp/grails-app/controllers/FrameworkController.groovy
Expand Up @@ -419,7 +419,10 @@ class FrameworkController {
* API actions
*/

def listProjects={
/**
* API: /api/projects, version 1.2
*/
def apiProjects={
Framework framework = frameworkService.getFrameworkFromUserSession(session,request)
def projlist=frameworkService.projects(framework)
session.projects=projlist
Expand All @@ -443,7 +446,10 @@ class FrameworkController {
}
}
}
def getProject={
/**
* API: /api/project/NAME, version 1.2
*/
def apiProject={
Framework framework = frameworkService.getFrameworkFromUserSession(session,request)
if(!params.project){
flash.error=g.message(code:'api.error.parameter.required',args:['project'])
Expand Down

0 comments on commit 69aefa4

Please sign in to comment.