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:
parent
adda27668b
commit
95d3266bee
17 changed files with 155 additions and 143 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue