File tree 1 file changed +2
-12
lines changed
routers/api/v1/activitypub 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) {
84
84
ctx .Error (http .StatusInternalServerError , "Unmarshal" , err )
85
85
return
86
86
}
87
-
88
87
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 )
100
90
}
101
91
102
92
// PersonInbox function
You can’t perform that action at this time.
0 commit comments