Use seperate ApiKey from the Pretix one
This commit is contained in:
parent
b0ec1761fb
commit
b6d19f9109
2 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,7 @@ func GetAttendiesByEvent(c *fiber.Ctx) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return c.Status(500).SendString("Internal Server Error")
|
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)
|
resp, err := config.Client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return c.Status(500).SendString("Internal Server Error")
|
return c.Status(500).SendString("Internal Server Error")
|
||||||
|
|
|
@ -2,6 +2,7 @@ package entities
|
||||||
|
|
||||||
type Environment struct {
|
type Environment struct {
|
||||||
Domain string `env:"DOMAIN,required"`
|
Domain string `env:"DOMAIN,required"`
|
||||||
|
ApiKeyPretix string `env:"API_KEY_PRETIX,required"`
|
||||||
ApiKey string `env:"API_KEY,required"`
|
ApiKey string `env:"API_KEY,required"`
|
||||||
DatabasePath string `env:"DATABASE_PATH,required"`
|
DatabasePath string `env:"DATABASE_PATH,required"`
|
||||||
Debug bool `env:"DEBUG"`
|
Debug bool `env:"DEBUG"`
|
||||||
|
|
Loading…
Reference in a new issue