mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 18:30:34 +00:00
dont drop err
This commit is contained in:
parent
900ceb2dfd
commit
3f2d8b015f
1 changed files with 8 additions and 2 deletions
|
@ -11,6 +11,7 @@ import (
|
||||||
"code.gitea.io/gitea/modules/activitypub"
|
"code.gitea.io/gitea/modules/activitypub"
|
||||||
"code.gitea.io/gitea/modules/context"
|
"code.gitea.io/gitea/modules/context"
|
||||||
"code.gitea.io/gitea/modules/json"
|
"code.gitea.io/gitea/modules/json"
|
||||||
|
"code.gitea.io/gitea/modules/log"
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"code.gitea.io/gitea/routers/api/v1/user"
|
"code.gitea.io/gitea/routers/api/v1/user"
|
||||||
|
|
||||||
|
@ -95,8 +96,13 @@ func Person(ctx *context.APIContext) {
|
||||||
|
|
||||||
ctx.Resp.Header().Add("Content-Type", "application/activity+json")
|
ctx.Resp.Header().Add("Content-Type", "application/activity+json")
|
||||||
ctx.Resp.WriteHeader(http.StatusOK)
|
ctx.Resp.WriteHeader(http.StatusOK)
|
||||||
binary, _ = json.Marshal(jsonmap)
|
binary, err = json.Marshal(jsonmap)
|
||||||
ctx.Resp.Write(binary)
|
if err != nil {
|
||||||
|
ctx.Error(http.StatusInternalServerError, "Marshal", err)
|
||||||
|
}
|
||||||
|
if _, err = ctx.Resp.Write(binary); err != nil {
|
||||||
|
log.Error("write to resp err: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PersonInbox function
|
// PersonInbox function
|
||||||
|
|
Loading…
Reference in a new issue