Fixing static checks about passing nil context

This commit is contained in:
Deluan
2020-04-26 12:06:38 -04:00
committed by Deluan Quintão
parent 95790b9eff
commit 03c3c192ed
17 changed files with 42 additions and 29 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
package auth
import (
"context"
"fmt"
"sync"
"time"
@@ -22,7 +23,7 @@ var (
func InitTokenAuth(ds model.DataStore) {
once.Do(func() {
secret, err := ds.Property(nil).DefaultGet(consts.JWTSecretKey, "not so secret")
secret, err := ds.Property(context.TODO()).DefaultGet(consts.JWTSecretKey, "not so secret")
if err != nil {
log.Error("No JWT secret found in DB. Setting a temp one, but please report this error", err)
}