mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Add repo list data, need front-end fix
This commit is contained in:
parent
f047df6e2b
commit
dfcae2a97a
6 changed files with 17 additions and 25 deletions
|
@ -67,20 +67,3 @@ func Delete(ctx *middleware.Context, form auth.DeleteRepoForm) {
|
|||
|
||||
ctx.Render.Redirect("/", 302)
|
||||
}
|
||||
|
||||
func List(ctx *middleware.Context) {
|
||||
if ctx.User != nil {
|
||||
ctx.Render.Redirect("/")
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Data["Title"] = "Repositories"
|
||||
repos, err := models.GetRepositories(ctx.User)
|
||||
if err != nil {
|
||||
ctx.Handle(200, "repo.List", err)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Data["Repos"] = repos
|
||||
ctx.Render.HTML(200, "repo/list", ctx.Data)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue