Update preview and file count when git push with http/ssh

This commit is contained in:
Thomas Miceli
2023-03-19 00:27:30 +01:00
parent b505f7147e
commit 8998e46fea
3 changed files with 35 additions and 1 deletions

View File

@ -134,7 +134,9 @@ func pack(ctx echo.Context, serviceType string) error {
// updatedAt is updated only if serviceType is receive-pack
if serviceType == "receive-pack" {
_ = getData(ctx, "gist").(*models.Gist).SetLastActiveNow()
gist := getData(ctx, "gist").(*models.Gist)
_ = gist.SetLastActiveNow()
_ = gist.UpdatePreviewAndCount()
}
return nil
}