Use seperate ApiKey from the Pretix one

This commit is contained in:
nikurasu 2023-10-17 15:57:57 +02:00
parent b0ec1761fb
commit b6d19f9109
Signed by: Nikurasu
SSH key fingerprint: SHA256:FIJQPK9c6Hjb3ZyIZoH+OwVq+tdNoLJzBcU6mGuLYwY
2 changed files with 2 additions and 1 deletions

View file

@ -24,7 +24,7 @@ func GetAttendiesByEvent(c *fiber.Ctx) error {
if err != nil {
return c.Status(500).SendString("Internal Server Error")
}
req.Header.Add("Authorization", fmt.Sprintf("Token %s", config.Env.Domain))
req.Header.Add("Authorization", fmt.Sprintf("Token %s", config.Env.ApiKeyPretix))
resp, err := config.Client.Do(req)
if err != nil {
return c.Status(500).SendString("Internal Server Error")

View file

@ -2,6 +2,7 @@ package entities
type Environment struct {
Domain string `env:"DOMAIN,required"`
ApiKeyPretix string `env:"API_KEY_PRETIX,required"`
ApiKey string `env:"API_KEY,required"`
DatabasePath string `env:"DATABASE_PATH,required"`
Debug bool `env:"DEBUG"`