Skip to content

Commit

Permalink
Merge pull request #1420 from skorobkov/develop
Browse files Browse the repository at this point in the history
Issue #1376
  • Loading branch information
fiftin authored Aug 26, 2023
2 parents 329f77c + 3208dbf commit 9de5a0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package api

import (
"fmt"
"github.com/ansible-semaphore/semaphore/api/helpers"
"github.com/ansible-semaphore/semaphore/db"
"net/http"
"os"
"strings"

"github.com/ansible-semaphore/semaphore/api/helpers"
"github.com/ansible-semaphore/semaphore/api/projects"
"github.com/ansible-semaphore/semaphore/api/sockets"
"github.com/ansible-semaphore/semaphore/db"
"github.com/ansible-semaphore/semaphore/util"
"github.com/gobuffalo/packr"
"github.com/gorilla/mux"
Expand Down Expand Up @@ -131,9 +131,9 @@ func Route() *mux.Router {
projectTaskStart.Use(projects.ProjectMiddleware, projects.GetMustCanMiddlewareFor(db.CanRunProjectTasks))
projectTaskStart.Path("/tasks").HandlerFunc(projects.AddTask).Methods("POST")

projectTaskStop := authenticatedAPI.PathPrefix("/tasks").Subrouter()
projectTaskStop := authenticatedAPI.PathPrefix("/project/{project_id}").Subrouter()
projectTaskStop.Use(projects.ProjectMiddleware, projects.GetTaskMiddleware, projects.GetMustCanMiddlewareFor(db.CanRunProjectTasks))
projectTaskStop.HandleFunc("/{task_id}/stop", projects.StopTask).Methods("POST")
projectTaskStop.HandleFunc("/tasks/{task_id}/stop", projects.StopTask).Methods("POST")

//
// Project resources CRUD
Expand Down

0 comments on commit 9de5a0e

Please sign in to comment.