aboutsummaryrefslogtreecommitdiff
path: root/resources/profile.go
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-12-19 15:41:43 +0000
committerJulio Capote <jcapote@gmail.com>2022-12-19 15:41:43 +0000
commitafdf8a014236452e098ab1266c9a9315824f8103 (patch)
tree0c1db202f6f5c81783d7d2ccb1502443ab84a8ae /resources/profile.go
parent2211d7ace360548f6ee450f03d995c6bb246be2b (diff)
downloadcommunique-afdf8a014236452e098ab1266c9a9315824f8103.tar.gz
url helpers, cgi response format
Diffstat (limited to 'resources/profile.go')
-rw-r--r--resources/profile.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/resources/profile.go b/resources/profile.go
index b62a9c5..971b11c 100644
--- a/resources/profile.go
+++ b/resources/profile.go
@@ -1,17 +1,14 @@
package resources
import (
- "fmt"
- "net/url"
- "path"
-
+ "git.capotej.com/capotej/communique/urls"
"github.com/go-fed/activity/streams"
)
func RenderProfile(name, domain string) (map[string]interface{}, error) {
- u, err := url.Parse(path.Join("https://", domain, "actors", name, "inbox"))
+ u, err := urls.UrlInbox(name, domain)
if err != nil {
- return nil, fmt.Errorf("could not partse url: %w", err)
+ return nil, err
}
inb := streams.NewActivityStreamsInboxProperty()