File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
routers/api/v1/activitypub Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -84,19 +84,9 @@ func Person(ctx *context.APIContext) {
8484 ctx .Error (http .StatusInternalServerError , "Unmarshal" , err )
8585 return
8686 }
87-
8887 jsonmap ["@context" ] = []string {"https://www.w3.org/ns/activitystreams" , "https://w3id.org/security/v1" }
89-
90- ctx .Resp .Header ().Add ("Content-Type" , "application/activity+json" )
91- ctx .Resp .WriteHeader (http .StatusOK )
92- binary , err = json .Marshal (jsonmap )
93- if err != nil {
94- ctx .Error (http .StatusInternalServerError , "Marshal" , err )
95- return
96- }
97- if _ , err = ctx .Resp .Write (binary ); err != nil {
98- log .Error ("write to resp err: %v" , err )
99- }
88+ ctx .JSON (http .StatusOK , jsonmap )
89+ ctx .Resp .Header ().Set ("Content-Type" , activitypub .ActivityStreamsContentType )
10090}
10191
10292// PersonInbox function
You can’t perform that action at this time.
0 commit comments