1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Move user follow and openid into models/user/ (#17613)

* Move UserRedirect into models/user/

* Fix lint & test

* Fix lint

* Fix lint

* remove nolint comment

* Fix lint

* Move user follow and openid into models/user

* Ignore the lint

* Ignore the lint

* Fix test

* ignore stutters lint on UserOpenID
This commit is contained in:
Lunny Xiao
2021-11-17 17:58:31 +08:00
committed by GitHub
parent adda27668b
commit 95d3266bee
17 changed files with 155 additions and 143 deletions

View File

@@ -131,7 +131,7 @@ func Profile(ctx *context.Context) {
}
// Show OpenID URIs
openIDs, err := models.GetUserOpenIDs(ctxUser.ID)
openIDs, err := user_model.GetUserOpenIDs(ctxUser.ID)
if err != nil {
ctx.ServerError("GetUserOpenIDs", err)
return
@@ -355,9 +355,9 @@ func Action(ctx *context.Context) {
var err error
switch ctx.Params(":action") {
case "follow":
err = models.FollowUser(ctx.User.ID, u.ID)
err = user_model.FollowUser(ctx.User.ID, u.ID)
case "unfollow":
err = models.UnfollowUser(ctx.User.ID, u.ID)
err = user_model.UnfollowUser(ctx.User.ID, u.ID)
}
if err != nil {