summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-07 17:23:02 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-07 17:23:02 -0400
commite05b1385fb093fbde1a6248a1f548f778fb09d09 (patch)
tree1e28efa7228d8c9c24f5d28ba81359673bfda8f1 /models/repo.go
parent8b6766ecbee91f0dc8d7a5c20262b2e2d96bb694 (diff)
downloadgitea-e05b1385fb093fbde1a6248a1f548f778fb09d09.tar.gz
gitea-e05b1385fb093fbde1a6248a1f548f778fb09d09.zip
Bug fix
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/repo.go b/models/repo.go
index d187349921..1867b99038 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -725,14 +725,14 @@ func GetCollaborators(repoName string) ([]string, error) {
// Watch is connection request for receiving repository notifycation.
type Watch struct {
Id int64
- Uid int64 `xorm:"UNIQUE(watch)"`
+ UserId int64 `xorm:"UNIQUE(watch)"`
RepoId int64 `xorm:"UNIQUE(watch)"`
}
// Watch or unwatch repository.
func WatchRepo(uid, rid int64, watch bool) (err error) {
if watch {
- if _, err = orm.Insert(&Watch{RepoId: rid, Uid: uid}); err != nil {
+ if _, err = orm.Insert(&Watch{RepoId: rid, UserId: uid}); err != nil {
return err
}
@@ -770,12 +770,12 @@ func NotifyWatchers(act *Action) error {
}
for i := range watches {
- if act.ActUserId == watches[i].Uid {
+ if act.ActUserId == watches[i].UserId {
continue
}
act.Id = 0
- act.UserId = watches[i].Uid
+ act.UserId = watches[i].UserId
if _, err = orm.InsertOne(act); err != nil {
return errors.New("repo.NotifyWatchers(create action): " + err.Error())
}