slightly simpler
This commit is contained in:
parent
c02a97aa68
commit
c758123933
4
web.go
4
web.go
|
@ -1534,13 +1534,11 @@ func fingerlicker(w http.ResponseWriter, r *http.Request) {
|
||||||
j := junk.New()
|
j := junk.New()
|
||||||
j["subject"] = fmt.Sprintf("acct:%s@%s", user.Name, serverName)
|
j["subject"] = fmt.Sprintf("acct:%s@%s", user.Name, serverName)
|
||||||
j["aliases"] = []string{user.URL}
|
j["aliases"] = []string{user.URL}
|
||||||
var links []junk.Junk
|
|
||||||
l := junk.New()
|
l := junk.New()
|
||||||
l["rel"] = "self"
|
l["rel"] = "self"
|
||||||
l["type"] = `application/activity+json`
|
l["type"] = `application/activity+json`
|
||||||
l["href"] = user.URL
|
l["href"] = user.URL
|
||||||
links = append(links, l)
|
j["links"] = []junk.Junk{l}
|
||||||
j["links"] = links
|
|
||||||
|
|
||||||
w.Header().Set("Cache-Control", "max-age=3600")
|
w.Header().Set("Cache-Control", "max-age=3600")
|
||||||
w.Header().Set("Content-Type", "application/jrd+json")
|
w.Header().Set("Content-Type", "application/jrd+json")
|
||||||
|
|
Loading…
Reference in New Issue