Merge branch 'main' into feature/bots

This commit is contained in:
Jason Song
2022-12-05 14:31:00 +08:00
163 changed files with 471 additions and 447 deletions

View File

@@ -480,7 +480,7 @@ func (ctx *preReceiveContext) loadPusherAndPermission() bool {
ctx.userPerm.UnitsMode[u.Type] = ctx.userPerm.AccessMode
}
} else {
user, err := user_model.GetUserByID(ctx.opts.UserID)
user, err := user_model.GetUserByID(ctx, ctx.opts.UserID)
if err != nil {
log.Error("Unable to get User id %d Error: %v", ctx.opts.UserID, err)
ctx.JSON(http.StatusInternalServerError, private.Response{