Can see directly the corresponding trace
This commit is contained in:
parent
1f4ce865aa
commit
3af70cf678
2 changed files with 13 additions and 5 deletions
8
works.go
8
works.go
|
|
@ -314,7 +314,7 @@ func declareAPIAdminWorksRoutes(router *gin.RouterGroup) {
|
|||
|
||||
c.JSON(http.StatusOK, build)
|
||||
})
|
||||
gradesRoutes.GET("/traces", func(c *gin.Context) {
|
||||
gradesRoutes.GET("/traces/*path", func(c *gin.Context) {
|
||||
g := c.MustGet("grade").(*WorkGrade)
|
||||
|
||||
var u *User
|
||||
|
|
@ -331,7 +331,7 @@ func declareAPIAdminWorksRoutes(router *gin.RouterGroup) {
|
|||
return
|
||||
}
|
||||
|
||||
c.Redirect(http.StatusFound, fmt.Sprintf("%s/%s", droneEndpoint, repo.TestsRef))
|
||||
c.Redirect(http.StatusFound, fmt.Sprintf("%s/%s", droneEndpoint, repo.TestsRef)+c.Param("path"))
|
||||
})
|
||||
gradesRoutes.POST("/traces", func(c *gin.Context) {
|
||||
w := c.MustGet("work").(*Work)
|
||||
|
|
@ -353,7 +353,7 @@ func declareAPIAdminWorksRoutes(router *gin.RouterGroup) {
|
|||
|
||||
TriggerTests(c, w, repo, u)
|
||||
})
|
||||
gradesRoutes.GET("/forge", func(c *gin.Context) {
|
||||
gradesRoutes.GET("/forge/*path", func(c *gin.Context) {
|
||||
g := c.MustGet("grade").(*WorkGrade)
|
||||
|
||||
var u *User
|
||||
|
|
@ -370,7 +370,7 @@ func declareAPIAdminWorksRoutes(router *gin.RouterGroup) {
|
|||
return
|
||||
}
|
||||
|
||||
c.Redirect(http.StatusFound, strings.Replace(strings.Replace(repo.URI, ":", "/", 1), "git@", "https://", 1))
|
||||
c.Redirect(http.StatusFound, strings.Replace(strings.Replace(repo.URI, ":", "/", 1), "git@", "https://", 1)+c.Param("path"))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue