summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/hook.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-03-27 17:45:26 +0100
committerGitHub <noreply@github.com>2021-03-27 17:45:26 +0100
commit290cf75f9343a43d9770b1d6f8f3332a23357e27 (patch)
tree520f9f8616fbff3b43a1808ef2d73af3f2fe534b /routers/api/v1/repo/hook.go
parentf4d27498bdc615605e14f783501e1d1256cd8d22 (diff)
downloadgitea-290cf75f9343a43d9770b1d6f8f3332a23357e27.tar.gz
gitea-290cf75f9343a43d9770b1d6f8f3332a23357e27.zip
[refactor] Unify the export of user data via API (#15144)
* [refactor] unify how user data is exported via API * test time via unix timestamp
Diffstat (limited to 'routers/api/v1/repo/hook.go')
-rw-r--r--routers/api/v1/repo/hook.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go
index 520a7a0202..5a0911544a 100644
--- a/routers/api/v1/repo/hook.go
+++ b/routers/api/v1/repo/hook.go
@@ -148,8 +148,8 @@ func TestHook(ctx *context.APIContext) {
convert.ToPayloadCommit(ctx.Repo.Repository, ctx.Repo.Commit),
},
Repo: convert.ToRepo(ctx.Repo.Repository, models.AccessModeNone),
- Pusher: convert.ToUser(ctx.User, ctx.IsSigned, false),
- Sender: convert.ToUser(ctx.User, ctx.IsSigned, false),
+ Pusher: convert.ToUserWithAccessMode(ctx.User, models.AccessModeNone),
+ Sender: convert.ToUserWithAccessMode(ctx.User, models.AccessModeNone),
}); err != nil {
ctx.Error(http.StatusInternalServerError, "PrepareWebhook: ", err)
return