summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/issue_subscription.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/issue_subscription.go')
-rw-r--r--routers/api/v1/repo/issue_subscription.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/v1/repo/issue_subscription.go b/routers/api/v1/repo/issue_subscription.go
index 8acd378cc5..09be3cc193 100644
--- a/routers/api/v1/repo/issue_subscription.go
+++ b/routers/api/v1/repo/issue_subscription.go
@@ -8,6 +8,7 @@ import (
"net/http"
"code.gitea.io/gitea/models"
+ user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/convert"
api "code.gitea.io/gitea/modules/structs"
@@ -114,9 +115,9 @@ func setIssueSubscription(ctx *context.APIContext, watch bool) {
return
}
- user, err := models.GetUserByName(ctx.Params(":user"))
+ user, err := user_model.GetUserByName(ctx.Params(":user"))
if err != nil {
- if models.IsErrUserNotExist(err) {
+ if user_model.IsErrUserNotExist(err) {
ctx.NotFound()
} else {
ctx.Error(http.StatusInternalServerError, "GetUserByName", err)