mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-03 06:08:42 +00:00
fix: return 404 on badge request for inactive repo (#1600)
closes #1427 with suggested edit.
This commit is contained in:
parent
9d90b1ffb7
commit
a2f226f7f9
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ import (
|
||||||
func GetBadge(c *gin.Context) {
|
func GetBadge(c *gin.Context) {
|
||||||
_store := store.FromContext(c)
|
_store := store.FromContext(c)
|
||||||
repo, err := _store.GetRepoName(c.Param("owner") + "/" + c.Param("name"))
|
repo, err := _store.GetRepoName(c.Param("owner") + "/" + c.Param("name"))
|
||||||
if err != nil {
|
if err != nil || !repo.IsActive {
|
||||||
c.AbortWithStatus(404)
|
c.AbortWithStatus(404)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue