1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00
This commit is contained in:
Lunny Xiao 2014-03-02 21:58:20 +08:00
parent 9c3a8ff299
commit c8909d4758

View file

@ -27,6 +27,13 @@ type Repo struct {
Updated time.Time `xorm:"updated"` Updated time.Time `xorm:"updated"`
} }
type Star struct {
Id int64
RepoId int64
UserId int64
Created time.Time `xorm:"created"`
}
// check if repository is exist // check if repository is exist
func IsRepositoryExist(user *User, reposName string) (bool, error) { func IsRepositoryExist(user *User, reposName string) (bool, error) {
repo := Repo{OwnerId: user.Id} repo := Repo{OwnerId: user.Id}
@ -121,6 +128,10 @@ func UnWatchRepository() {
} }
func ForkRepository(reposName string, userId int64) {
}
func RepoPath(userName, repoName string) string { func RepoPath(userName, repoName string) string {
return filepath.Join(UserPath(userName), repoName+".git") return filepath.Join(UserPath(userName), repoName+".git")
} }