0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-28 06:16:31 +01:00
This commit is contained in:
Andrey Nering 2017-03-29 21:18:28 -03:00
parent e4a33ed4d0
commit caed86fc6e

View File

@ -24,6 +24,7 @@ func (iw *IssueWatch) BeforeInsert() {
iw.UpdatedUnix = time.Now().Unix() iw.UpdatedUnix = time.Now().Unix()
} }
// BeforeUpdate is invoked from XORM before updating an object of this type.
func (iw *IssueWatch) BeforeUpdate() { func (iw *IssueWatch) BeforeUpdate() {
iw.Updated = time.Now() iw.Updated = time.Now()
iw.UpdatedUnix = time.Now().Unix() iw.UpdatedUnix = time.Now().Unix()
@ -70,6 +71,7 @@ func getIssueWatch(e Engine, userID, issueID int64) (iw *IssueWatch, exists bool
return return
} }
// GetIssueWatchers returns watchers/unwatchers of a given issue
func GetIssueWatchers(issueID int64) ([]*IssueWatch, error) { func GetIssueWatchers(issueID int64) ([]*IssueWatch, error) {
return getIssueWatchers(x, issueID) return getIssueWatchers(x, issueID)
} }