Skip to content

Commit 4931d4c

Browse files
committed
fix: revert removal of prexfix for ctfd
1 parent bb452ef commit 4931d4c

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

internal/ctf/ctfd.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package ctf
22

33
import (
4+
"fmt"
45
"instancer/internal/env"
56

67
ctfd "github.com/ctfer-io/go-ctfd/api"
@@ -16,6 +17,7 @@ type Client struct {
1617
func New() *Client {
1718
c := env.Get()
1819

20+
fmt.Println(c.CTFd.URL)
1921
nonce, session, err := ctfd.GetNonceAndSession(c.CTFd.URL)
2022
if err != nil {
2123
logrus.Fatalf("Failed getting nonce and session: %s", err)

internal/env/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Config struct {
99
CTFd struct {
1010
URL string `env:"URL"`
1111
Token string `env:"TOKEN"`
12-
}
12+
} `envPrefix:"CTFD_"`
1313

1414
Discord struct {
1515
WebhookId uint64 `env:"WEBHOOK_ID"`

0 commit comments

Comments
 (0)