forked from forgejo/forgejo
Finish watch backend
This commit is contained in:
parent
59ea3c0413
commit
ee92fb8635
3 changed files with 8 additions and 0 deletions
|
@ -67,6 +67,12 @@ func GetWatches(repoId int64) ([]Watch, error) {
|
|||
return watches, err
|
||||
}
|
||||
|
||||
// IsWatching checks if user has watched given repository.
|
||||
func IsWatching(userId, repoId int64) bool {
|
||||
has, _ := orm.Get(&Watch{0, repoId, userId})
|
||||
return has
|
||||
}
|
||||
|
||||
var (
|
||||
gitInitLocker = sync.Mutex{}
|
||||
LanguageIgns, Licenses []string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue