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
+1 -1
View File
@@ -41,7 +41,7 @@ func Repos(ctx *context.Context) {
// DeleteRepo delete one repository
func DeleteRepo(ctx *context.Context) {
repo, err := repo_model.GetRepositoryByID(ctx.FormInt64("id"))
repo, err := repo_model.GetRepositoryByID(ctx, ctx.FormInt64("id"))
if err != nil {
ctx.ServerError("GetRepositoryByID", err)
return
+2 -2
View File
@@ -206,7 +206,7 @@ func NewUserPost(ctx *context.Context) {
}
func prepareUserInfo(ctx *context.Context) *user_model.User {
u, err := user_model.GetUserByID(ctx.ParamsInt64(":userid"))
u, err := user_model.GetUserByID(ctx, ctx.ParamsInt64(":userid"))
if err != nil {
if user_model.IsErrUserNotExist(err) {
ctx.Redirect(setting.AppSubURL + "/admin/users")
@@ -413,7 +413,7 @@ func EditUserPost(ctx *context.Context) {
// DeleteUser response for deleting a user
func DeleteUser(ctx *context.Context) {
u, err := user_model.GetUserByID(ctx.ParamsInt64(":userid"))
u, err := user_model.GetUserByID(ctx, ctx.ParamsInt64(":userid"))
if err != nil {
ctx.ServerError("GetUserByID", err)
return