aboutsummaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
Diffstat (limited to 'http')
-rw-r--r--http/server.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/http/server.go b/http/server.go
index 6d68d0e..c720a6d 100644
--- a/http/server.go
+++ b/http/server.go
@@ -33,5 +33,16 @@ func (s *Server) Start(zapWriter io.Writer) {
})
+ router.GET("/actors/:actor", func(c *gin.Context) {
+ actorParam := c.Param("actor")
+ resource := s.registry.LookupByName(actorParam)
+ if resource != nil {
+ c.JSON(http.StatusOK, resource)
+ } else {
+ c.JSON(http.StatusNotFound, nil)
+ }
+
+ })
+
router.Run()
}