Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

appview/pages/markup: use xrpc for fetching image from knot

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>

authored by

Anirudh Oppiliappan and committed by
oppiliappan
f0b92a26 a3bf54b3

+10 -8
+10 -8
appview/pages/markup/markdown.go
··· 22 22 "github.com/yuin/goldmark/util" 23 23 htmlparse "golang.org/x/net/html" 24 24 25 + "tangled.sh/tangled.sh/core/api/tangled" 25 26 "tangled.sh/tangled.sh/core/appview/pages/repoinfo" 26 27 ) 27 28 ··· 232 231 233 232 actualPath := rctx.actualPath(dst) 234 233 234 + repoName := fmt.Sprintf("%s/%s", rctx.RepoInfo.OwnerDid, rctx.RepoInfo.Name) 235 + 236 + query := fmt.Sprintf("repo=%s&ref=%s&path=%s&raw=true", 237 + repoName, url.PathEscape(rctx.RepoInfo.Ref), actualPath) 238 + 235 239 parsedURL := &url.URL{ 236 - Scheme: scheme, 237 - Host: rctx.Knot, 238 - Path: path.Join("/", 239 - rctx.RepoInfo.OwnerDid, 240 - rctx.RepoInfo.Name, 241 - "raw", 242 - url.PathEscape(rctx.RepoInfo.Ref), 243 - actualPath), 240 + Scheme: scheme, 241 + Host: rctx.Knot, 242 + Path: path.Join("/xrpc", tangled.RepoBlobNSID), 243 + RawQuery: query, 244 244 } 245 245 newPath := parsedURL.String() 246 246 return newPath