aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2023-01-02 14:08:11 +0000
committerJulio Capote <jcapote@gmail.com>2023-01-02 14:08:11 +0000
commit91a081a2bc16540c37ac76a719ab4dd79608ed5d (patch)
tree59769446d642ec591f7988ed19657fde9480a35c
parent8d23867d2c6d3c6f0dd9681192b9b8642ceea254 (diff)
downloadcommunique-91a081a2bc16540c37ac76a719ab4dd79608ed5d.tar.gz
rename profile to actor
-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