summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/view.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/view.go')
-rw-r--r--routers/web/repo/view.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index 72ffda7e01..24f559fe45 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -18,7 +18,8 @@ import (
"strings"
"time"
- "code.gitea.io/gitea/models"
+ activities_model "code.gitea.io/gitea/models/activities"
+ admin_model "code.gitea.io/gitea/models/admin"
asymkey_model "code.gitea.io/gitea/models/asymkey"
"code.gitea.io/gitea/models/db"
git_model "code.gitea.io/gitea/models/git"
@@ -666,9 +667,9 @@ func safeURL(address string) string {
func checkHomeCodeViewable(ctx *context.Context) {
if len(ctx.Repo.Units) > 0 {
if ctx.Repo.Repository.IsBeingCreated() {
- task, err := models.GetMigratingTask(ctx.Repo.Repository.ID)
+ task, err := admin_model.GetMigratingTask(ctx.Repo.Repository.ID)
if err != nil {
- if models.IsErrTaskDoesNotExist(err) {
+ if admin_model.IsErrTaskDoesNotExist(err) {
ctx.Data["Repo"] = ctx.Repo
ctx.Data["CloneAddr"] = ""
ctx.Data["Failed"] = true
@@ -694,7 +695,7 @@ func checkHomeCodeViewable(ctx *context.Context) {
if ctx.IsSigned {
// Set repo notification-status read if unread
- if err := models.SetRepoReadBy(ctx, ctx.Repo.Repository.ID, ctx.Doer.ID); err != nil {
+ if err := activities_model.SetRepoReadBy(ctx, ctx.Repo.Repository.ID, ctx.Doer.ID); err != nil {
ctx.ServerError("ReadBy", err)
return
}