Move api struct to a seprate pkg

This commit is contained in:
Łukasz Magiera
2019-12-09 18:22:11 +01:00
parent 0b4db5530c
commit c49dc28a04
11 changed files with 101 additions and 93 deletions
+2 -2
View File
@@ -3,10 +3,10 @@ package modules
import (
"context"
"crypto/rand"
"github.com/filecoin-project/lotus/api/apistruct"
"io"
"io/ioutil"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/lib/addrutil"
@@ -57,7 +57,7 @@ func APISecret(keystore types.KeyStore, lr repo.LockedRepo) (*dtypes.APIAlg, err
// TODO: make this configurable
p := jwtPayload{
Allow: api.AllPermissions,
Allow: apistruct.AllPermissions,
}
cliToken, err := jwt.Sign(&p, jwt.NewHS256(key.PrivateKey))