diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-03-22 08:03:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 15:03:22 +0800 |
commit | 80fd25524e13dedbdc3527b32d008de152213a89 (patch) | |
tree | 63b2bfe4ffaf1dce12080cabdc2e845c8731a673 /routers/web/events | |
parent | 5495ba7660979973ba19e304786135da474e0e64 (diff) | |
download | gitea-80fd25524e13dedbdc3527b32d008de152213a89.tar.gz gitea-80fd25524e13dedbdc3527b32d008de152213a89.zip |
Renamed ctx.User to ctx.Doer. (#19161)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/events')
-rw-r--r-- | routers/web/events/events.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/events/events.go b/routers/web/events/events.go index 41f52375c3..02d20550af 100644 --- a/routers/web/events/events.go +++ b/routers/web/events/events.go @@ -48,7 +48,7 @@ func Events(ctx *context.Context) { shutdownCtx := graceful.GetManager().ShutdownContext() - uid := ctx.User.ID + uid := ctx.Doer.ID messageChan := eventsource.GetManager().Register(uid) @@ -82,7 +82,7 @@ loop: } _, err := event.WriteTo(ctx.Resp) if err != nil { - log.Error("Unable to write to EventStream for user %s: %v", ctx.User.Name, err) + log.Error("Unable to write to EventStream for user %s: %v", ctx.Doer.Name, err) go unregister() break loop } @@ -94,7 +94,7 @@ loop: go unregister() break loop case <-stopwatchTimer.C: - sws, err := models.GetUserStopwatches(ctx.User.ID, db.ListOptions{}) + sws, err := models.GetUserStopwatches(ctx.Doer.ID, db.ListOptions{}) if err != nil { log.Error("Unable to GetUserStopwatches: %v", err) continue @@ -114,7 +114,7 @@ loop: Data: string(dataBs), }).WriteTo(ctx.Resp) if err != nil { - log.Error("Unable to write to EventStream for user %s: %v", ctx.User.Name, err) + log.Error("Unable to write to EventStream for user %s: %v", ctx.Doer.Name, err) go unregister() break loop } @@ -145,7 +145,7 @@ loop: _, err := event.WriteTo(ctx.Resp) if err != nil { - log.Error("Unable to write to EventStream for user %s: %v", ctx.User.Name, err) + log.Error("Unable to write to EventStream for user %s: %v", ctx.Doer.Name, err) go unregister() break loop } |