read from bytes

This commit is contained in:
Andre Medeiros 2021-07-05 21:30:42 -04:00
parent 5f1f7ff7d6
commit 239e5b928c

View file

@ -30,11 +30,11 @@ type application struct {
var workers int = runtime.NumCPU() * 8
func accountWorker(id int, rc *reddit.Client, db *sql.DB, logger *log.Logger, quit chan bool) {
authKey, err := token.AuthKeyFromFile(os.Getenv("APPLE_AUTHKEY_PATH"))
authKey, err := token.AuthKeyFromBytes([]byte(os.Getenv("APPLE_KEY_PKEY")))
token := &token.Token{
AuthKey: authKey,
KeyID: "T88A7G9LZ8",
TeamID: "XG3L8T56DK",
KeyID: os.Getenv("APPLE_KEY_ID"),
TeamID: os.Getenv("APPLE_TEAM_ID"),
}
if err != nil {