2 Commits
1.0.0 ... 1.0.2

Author SHA1 Message Date
c09c00ec68 feat(pdfs): Set download names for pdf generation responses
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/tag/release Pipeline was successful
2024-12-12 18:24:07 +01:00
1f4981b0a9 fix(config): Don't fail on missing env
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/tag/release Pipeline was successful
2024-12-12 18:18:41 +01:00
4 changed files with 4 additions and 1 deletions

View File

@@ -69,6 +69,7 @@ func (h *DefaultHandler) GenerateCard(c *fiber.Ctx) error {
}
c.Set(fiber.HeaderContentType, "application/pdf")
c.Set(fiber.HeaderContentDisposition, "attachment; filename=runner-cards.pdf")
return c.Send(pdf)
}

View File

@@ -69,6 +69,7 @@ func (h *DefaultHandler) GenerateCertificate(c *fiber.Ctx) error {
}
c.Set(fiber.HeaderContentType, "application/pdf")
c.Set(fiber.HeaderContentDisposition, "attachment; filename=certificate.pdf")
return c.Send(pdf)
}

View File

@@ -72,6 +72,7 @@ func (h *DefaultHandler) GenerateContract(c *fiber.Ctx) error {
}
c.Set(fiber.HeaderContentType, "application/pdf")
c.Set(fiber.HeaderContentDisposition, "attachment; filename=runner-contracts.pdf")
return c.Send(pdf)
}

View File

@@ -45,7 +45,7 @@ func loadEnv() error {
viper.AutomaticEnv()
err := viper.ReadInConfig()
if err != nil {
return err
log.Println("No .env file found")
}
// Unmarshal the config from file and env into the config struct