mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Refactor User.Id to User.ID
This commit is contained in:
@@ -78,7 +78,7 @@ func CheckMyFollowing(ctx *context.APIContext) {
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
checkUserFollowing(ctx, ctx.User, target.Id)
|
||||
checkUserFollowing(ctx, ctx.User, target.ID)
|
||||
}
|
||||
|
||||
// https://github.com/gogits/go-gogs-client/wiki/Users-Followers#check-if-one-user-follows-another
|
||||
@@ -91,7 +91,7 @@ func CheckFollowing(ctx *context.APIContext) {
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
checkUserFollowing(ctx, u, target.Id)
|
||||
checkUserFollowing(ctx, u, target.ID)
|
||||
}
|
||||
|
||||
// https://github.com/gogits/go-gogs-client/wiki/Users-Followers#follow-a-user
|
||||
@@ -100,7 +100,7 @@ func Follow(ctx *context.APIContext) {
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
if err := models.FollowUser(ctx.User.Id, target.Id); err != nil {
|
||||
if err := models.FollowUser(ctx.User.ID, target.ID); err != nil {
|
||||
ctx.Error(500, "FollowUser", err)
|
||||
return
|
||||
}
|
||||
@@ -113,7 +113,7 @@ func Unfollow(ctx *context.APIContext) {
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
if err := models.UnfollowUser(ctx.User.Id, target.Id); err != nil {
|
||||
if err := models.UnfollowUser(ctx.User.ID, target.ID); err != nil {
|
||||
ctx.Error(500, "UnfollowUser", err)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user