Skip to content

Commit

Permalink
add public getsession endpoint (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi authored Nov 25, 2024
1 parent e4f121f commit 949d3aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/abstractions/experimental/bot/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ func registerBotRoutes(g *echo.Group, pbs *PetriBotService) *botGroup {
g.GET("/:deploymentName", auth.WithAuth(group.BotOpenSession))
g.GET("/:deploymentName/latest", auth.WithAuth(group.BotOpenSession))
g.GET("/:deploymentName/v:version", auth.WithAuth(group.BotOpenSession))
g.GET("/public/:stubId", auth.WithAssumedStubAuth(group.BotOpenSession, group.pbs.isPublic))
g.DELETE("/:stubId/:sessionId", auth.WithAuth(group.BotDeleteSession))
g.GET("/:stubId/:sessionId", auth.WithAuth(group.BotGetSession))
g.GET("/:stubId/sessions", auth.WithAuth(group.BotListSessions))

// Public endpoints
g.GET("/public/:stubId", auth.WithAssumedStubAuth(group.BotOpenSession, group.pbs.isPublic))
g.GET("/public/:stubId/:sessionId", auth.WithAssumedStubAuth(group.BotGetSession, group.pbs.isPublic))

return group
}

Expand Down

0 comments on commit 949d3aa

Please sign in to comment.