mirror of
https://codeberg.org/gothub/gothub
synced 2024-12-06 19:16:24 +01:00
files should use same path as github does
This commit is contained in:
+1
-1
@@ -106,7 +106,7 @@ func Serve() {
|
||||
return nil
|
||||
})
|
||||
app.Get("/:user/:repo", pages.HandleRepo)
|
||||
app.Get("/:user/:repo/tree/:branch/+", pages.FileView)
|
||||
app.Get("/:user/:repo/blob/:branch/+", pages.FileView)
|
||||
app.Get("/download/:user/:repo/:branch", func(c *fiber.Ctx) error {
|
||||
utils.ProxyRequest(c, "https://github.com/"+c.Params("user")+"/"+c.Params("repo")+"/archive/"+c.Params("branch")+".zip")
|
||||
return nil
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="filesList">
|
||||
<a href="/{{.Fullname}}/tree/{{.DefaultBranch}}/{{.Path}}"
|
||||
<a href="/{{.Fullname}}/blob/{{.DefaultBranch}}/{{.Path}}"
|
||||
>{{.Path}}</a
|
||||
>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user