mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Count downloads for tag archives
This commit is contained in:
parent
f8a5d6872c
commit
613e5387c5
22 changed files with 469 additions and 95 deletions
|
@ -302,7 +302,7 @@ func GetArchive(ctx *context.APIContext) {
|
|||
|
||||
func archiveDownload(ctx *context.APIContext) {
|
||||
uri := ctx.Params("*")
|
||||
aReq, err := archiver_service.NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, uri)
|
||||
aReq, err := archiver_service.NewRequest(ctx, ctx.Repo.Repository.ID, ctx.Repo.GitRepo, uri)
|
||||
if err != nil {
|
||||
if errors.Is(err, archiver_service.ErrUnknownArchiveFormat{}) {
|
||||
ctx.Error(http.StatusBadRequest, "unknown archive format", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue