aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http/router.go2
-rw-r--r--registry/registry.go4
-rw-r--r--views/actor.go (renamed from views/profile.go)2
3 files changed, 4 insertions, 4 deletions
diff --git a/http/router.go b/http/router.go
index 23843c4..f763c79 100644
--- a/http/router.go
+++ b/http/router.go
@@ -49,7 +49,7 @@ func (s *Router) Start(zapWriter io.Writer) {
// "User" endpoint
router.GET("/actors/:actor", func(c *gin.Context) {
actorParam := c.Param("actor")
- resource, err := s.registry.Profile(actorParam)
+ resource, err := s.registry.Actor(actorParam)
render(c, resource, err)
})
diff --git a/registry/registry.go b/registry/registry.go
index 21f4622..a24d2d7 100644
--- a/registry/registry.go
+++ b/registry/registry.go
@@ -31,12 +31,12 @@ func NewRegistry(cfg config.Config, persister *models.Persister) *Registry {
return &reg
}
-func (r *Registry) Profile(name string) (map[string]interface{}, error) {
+func (r *Registry) Actor(name string) (map[string]interface{}, error) {
handler := r.findByName(name)
if handler == nil {
return nil, nil
}
- return views.RenderProfile(handler.handlerCfg.Name, r.cfg.Domain)
+ return views.RenderActor(handler.handlerCfg.Name, r.cfg.Domain)
}
func (r *Registry) Outbox(name string) (map[string]interface{}, error) {
diff --git a/views/profile.go b/views/actor.go
index 5b82b46..a91044a 100644
--- a/views/profile.go
+++ b/views/actor.go
@@ -7,7 +7,7 @@ import (
"github.com/go-fed/activity/streams"
)
-func RenderProfile(name, domain string) (map[string]interface{}, error) {
+func RenderActor(name, domain string) (map[string]interface{}, error) {
inbox, err := urls.UrlInbox(name, domain)
if err != nil {
return nil, err