diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-19 23:48:30 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-19 23:48:30 -0400 |
commit | ee92fb8635cf9f80453386f2dc4f8b3cd7e9a17e (patch) | |
tree | 05364a3705685f934b09ab80108a3b8e443f047f /modules | |
parent | 59ea3c0413723521e7504fa5b1be2c3780cbb2ea (diff) | |
download | gitea-ee92fb8635cf9f80453386f2dc4f8b3cd7e9a17e.tar.gz gitea-ee92fb8635cf9f80453386f2dc4f8b3cd7e9a17e.zip |
Finish watch backend
Diffstat (limited to 'modules')
-rw-r--r-- | modules/middleware/context.go | 1 | ||||
-rw-r--r-- | modules/middleware/repo.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go index c97c3299c4..dfa39c6f86 100644 --- a/modules/middleware/context.go +++ b/modules/middleware/context.go @@ -31,6 +31,7 @@ type Context struct { Repo struct { IsValid bool IsOwner bool + IsWatching bool Repository *models.Repository Owner *models.User } diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index a12212affa..e03ddc50a6 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -63,6 +63,7 @@ func RepoAssignment(redirect bool) martini.Handler { } ctx.Repo.IsValid = true + ctx.Repo.IsWatching = models.IsWatching(ctx.User.Id, repo.Id) ctx.Repo.Repository = repo ctx.Data["IsRepositoryValid"] = true |