Browse Source

fix #2804

pull/2804/merge
Unknwon 9 years ago
parent
commit
f76d821bda
  1. 3
      cmd/web.go
  2. 2
      models/release.go

3
cmd/web.go

@ -194,6 +194,9 @@ func runWeb(ctx *cli.Context) {
// Routers. // Routers.
m.Get("/", ignSignIn, routers.Home) m.Get("/", ignSignIn, routers.Home)
m.Group("/explore", func() { m.Group("/explore", func() {
m.Get("", func(ctx *context.Context) {
ctx.Redirect(setting.AppSubUrl + "/explore/repos")
})
m.Get("/repos", routers.ExploreRepos) m.Get("/repos", routers.ExploreRepos)
m.Get("/users", routers.ExploreUsers) m.Get("/users", routers.ExploreUsers)
}, ignSignIn) }, ignSignIn)

2
models/release.go

@ -39,7 +39,7 @@ type Release struct {
} }
func (r *Release) BeforeInsert() { func (r *Release) BeforeInsert() {
r.CreatedUnix = r.Created.UTC().Unix() r.CreatedUnix = time.Now().UTC().Unix()
} }
func (r *Release) AfterSet(colName string, _ xorm.Cell) { func (r *Release) AfterSet(colName string, _ xorm.Cell) {

Loading…
Cancel
Save