refactor services

This commit is contained in:
Michael Jerger 2024-03-28 15:00:55 +01:00
parent 1ad7bdf983
commit 4d5c8b5563
8 changed files with 91 additions and 81 deletions

View file

@ -1,5 +1,6 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2020 The Gitea Authors. All rights reserved.
// Copyright 2024 The forgejo Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package repo
@ -316,9 +317,9 @@ func Action(ctx *context.Context) {
case "unwatch":
err = repo_model.WatchRepo(ctx, ctx.Doer.ID, ctx.Repo.Repository.ID, false)
case "star":
err = repo_model.StarRepo(ctx, *ctx.Doer, ctx.Repo.Repository.ID, true)
err = repo_service.StarRepo(ctx, *ctx.Doer, ctx.Repo.Repository.ID, true)
case "unstar":
err = repo_model.StarRepo(ctx, *ctx.Doer, ctx.Repo.Repository.ID, false)
err = repo_service.StarRepo(ctx, *ctx.Doer, ctx.Repo.Repository.ID, false)
case "accept_transfer":
err = acceptOrRejectRepoTransfer(ctx, true)
case "reject_transfer":