Add update user profile back end, add new gitignore and license, add template data to public profile page
This commit is contained in:
parent
adedd9181c
commit
57bc2d1ca0
13 changed files with 133 additions and 21 deletions
|
@ -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
|
||||
|
|
|
@ -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"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue