diff options
Diffstat (limited to 'http/server.go')
-rw-r--r-- | http/server.go | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/http/server.go b/http/server.go index e0050b2..d8560bb 100644 --- a/http/server.go +++ b/http/server.go @@ -37,7 +37,7 @@ func (s *Server) Start(zapWriter io.Writer) { // "User" endpoint router.GET("/actors/:actor", func(c *gin.Context) { actorParam := c.Param("actor") - resource := s.registry.LookupByName(actorParam) + resource, _ := s.registry.LookupByName(actorParam) if resource != nil { c.JSON(http.StatusOK, resource) } else { @@ -46,28 +46,27 @@ func (s *Server) Start(zapWriter io.Writer) { }) - // Inbox - router.POST("/actors/:actor/inbox", 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) - } + // // Inbox + // router.POST("/actors/:actor/inbox", 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) + // } - }) - // Outbox - router.GET("/actors/:actor/outbox", 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) - } - - }) + // }) + // // Outbox + // router.GET("/actors/:actor/outbox", 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() } |