diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-13 03:39:18 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-13 03:39:18 -0400 |
commit | 57bc2d1ca0bfc3ba90e6d85309dba39415c6db73 (patch) | |
tree | 8d452408dbc3f89ac3a0a393ad5eadd80370f167 /models | |
parent | adedd9181c07ed926bf5835623293df4fcc706d2 (diff) |
Add update user profile back end, add new gitignore and license, add template data to public profile page
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 4 | ||||
-rw-r--r-- | models/user.go | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go index 6e45367c..b7b5ac42 100644 --- a/models/repo.go +++ b/models/repo.go @@ -352,6 +352,10 @@ func DeleteRepository(userId, repoId int64, userName string) (err error) { session.Rollback() return err } + if _, err := session.Delete(&Access{UserName: userName, RepoName: repo.Name}); err != nil { + session.Rollback() + return err + } if _, err = session.Exec("update user set num_repos = num_repos - 1 where id = ?", userId); err != nil { session.Rollback() return err diff --git a/models/user.go b/models/user.go index c59e4ae1..06db7d8b 100644 --- a/models/user.go +++ b/models/user.go @@ -48,7 +48,9 @@ type User struct { NumFollowings int NumStars int NumRepos int - Avatar string `xorm:"varchar(2048) not null"` + Avatar string `xorm:"varchar(2048) not null"` + Location string + Website string Created time.Time `xorm:"created"` Updated time.Time `xorm:"updated"` } |