mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 00:55:32 +00:00
trying to stop instability from happening
This commit is contained in:
@@ -21,15 +21,19 @@ func GetIssue(kgpz *xmlmodels.Library, pics *pictures.PicturesProvider) fiber.Ha
|
||||
return func(c *fiber.Ctx) error {
|
||||
y := c.Params("year")
|
||||
yi, err := strconv.Atoi(y)
|
||||
if err != nil || yi < MINYEAR || yi > MAXYEAR {
|
||||
logging.Error(err, "Year is not a valid number")
|
||||
if err != nil {
|
||||
return c.SendStatus(fiber.StatusNotFound)
|
||||
}
|
||||
if yi < MINYEAR || yi > MAXYEAR {
|
||||
return c.SendStatus(fiber.StatusNotFound)
|
||||
}
|
||||
|
||||
d := c.Params("issue")
|
||||
di, err := strconv.Atoi(d)
|
||||
if err != nil || di < 1 {
|
||||
logging.Error(err, "Issue is not a valid number")
|
||||
if err != nil {
|
||||
return c.SendStatus(fiber.StatusNotFound)
|
||||
}
|
||||
if di < 1 {
|
||||
return c.SendStatus(fiber.StatusNotFound)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user