1
0
Fork 0
forked from forgejo/forgejo

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 {