very basic api documentation autogeneration

This commit is contained in:
Jeromy
2020-05-18 17:20:54 -07:00
parent 7fd481ea6f
commit 607bcc401c
7 changed files with 344 additions and 40 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ import (
"golang.org/x/xerrors"
"gopkg.in/urfave/cli.v2"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/apistruct"
"github.com/filecoin-project/lotus/node/repo"
)
@@ -45,7 +46,7 @@ var authCreateAdminToken = &cli.Command{
perm := cctx.String("perm")
idx := 0
for i, p := range apistruct.AllPermissions {
if perm == p {
if api.Permission(perm) == p {
idx = i + 1
}
}
@@ -93,7 +94,7 @@ var authApiInfoToken = &cli.Command{
perm := cctx.String("perm")
idx := 0
for i, p := range apistruct.AllPermissions {
if perm == p {
if api.Permission(perm) == p {
idx = i + 1
}
}