move to jwt tokens

This commit is contained in:
2023-04-08 20:18:56 -05:00
parent 3d0579c82e
commit 0a15180b53
6 changed files with 160 additions and 129 deletions

View File

@@ -12,6 +12,7 @@ type Controller struct {
openaiClient *openai.Client
unraidAPIKey string
unraidURI string
jwtToken string
config *configStruct
}
@@ -29,6 +30,7 @@ func NewController() *Controller {
openaiClient := openai.NewClient(openaiApiKey)
unraidAPIKey := os.Getenv("UNRAID_API_KEY")
unraidURI := os.Getenv("UNRAID_URI")
jwtToken := os.Getenv("jwtToken")
if err != nil {
fmt.Println(err.Error())
@@ -38,6 +40,7 @@ func NewController() *Controller {
openaiClient: openaiClient,
unraidAPIKey: unraidAPIKey,
unraidURI: unraidURI,
jwtToken: jwtToken,
}
}