forked from forgejo/forgejo
Refactor User.Id to User.ID
This commit is contained in:
parent
46e96c008c
commit
1f2e173a74
79 changed files with 333 additions and 328 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue