diff options
Diffstat (limited to 'application_router.go')
-rw-r--r-- | application_router.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/application_router.go b/application_router.go index be01e11..128b1ec 100644 --- a/application_router.go +++ b/application_router.go @@ -200,6 +200,20 @@ func CreateApplicationRouter(applicationContext *ApplicationContext) *gin.Engine } }) + api.GET("/streams/:id", func(c *gin.Context) { + id, err := RowIDFromHex(c.Param("id")) + if err != nil { + badRequest(c, err) + return + } + var format QueryFormat + if err := c.ShouldBindQuery(&format); err != nil { + badRequest(c, err) + return + } + success(c, applicationContext.ConnectionStreamsController.GetConnectionPayload(c, id, format)) + }) + api.GET("/services", func(c *gin.Context) { success(c, applicationContext.ServicesController.GetServices()) }) |